Skip to content

Commit

Permalink
devel/py-pyproject-fmt: Add py-pyproject-fmt 0.3.3
Browse files Browse the repository at this point in the history
pyproject-fmt applies a consistent format to your pyproject.toml file with
comment support. It can be used as a CLI tool or a pre-commit hook.

WWW: https://github.com/tox-dev/pyproject-fmt
  • Loading branch information
sunpoet committed Jun 21, 2022
1 parent 064d041 commit b0546a5
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 0 deletions.
1 change: 1 addition & 0 deletions devel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5108,6 +5108,7 @@
SUBDIR += py-pyperclip
SUBDIR += py-pyperf
SUBDIR += py-pyplusplus
SUBDIR += py-pyproject-fmt
SUBDIR += py-pypugjs
SUBDIR += py-pyqtree
SUBDIR += py-pyquery
Expand Down
34 changes: 34 additions & 0 deletions devel/py-pyproject-fmt/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>

PORTNAME= pyproject-fmt
PORTVERSION= 0.3.3
CATEGORIES= devel python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= pyproject_fmt-${PORTVERSION}

MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Format your pyproject.toml file

LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt

RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}packaging>=21.3:devel/py-packaging@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}tomlkit>=0.10:textproc/py-tomlkit@${PY_FLAVOR}

USES= python:3.7+
USE_PYTHON= autoplist concurrent distutils

NO_ARCH= yes

.include <bsd.port.pre.mk>

.if ${PYTHON_REL} < 30800
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=3.10:devel/py-typing-extensions@${PY_FLAVOR}
.endif

post-patch:
@${RM} ${WRKSRC}/pyproject.toml
@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py

.include <bsd.port.post.mk>
3 changes: 3 additions & 0 deletions devel/py-pyproject-fmt/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
TIMESTAMP = 1655561122
SHA256 (pyproject_fmt-0.3.3.tar.gz) = 7ca6b102c8717a77e1f567daa74f2555a22554ae2edeed672f94cc682da99763
SIZE (pyproject_fmt-0.3.3.tar.gz) = 9731
52 changes: 52 additions & 0 deletions devel/py-pyproject-fmt/files/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# -*- coding: utf-8 -*-
from setuptools import setup

setup(
name='pyproject-fmt',
version='%%PORTVERSION%%',
description='Format your pyproject.toml file',
long_description='# pyproject-fmt\n\n[![PyPI](https://img.shields.io/pypi/v/pyproject-fmt?style=flat-square)](https://pypi.org/project/pyproject-fmt)\n[![PyPI - Implementation](https://img.shields.io/pypi/implementation/pyproject-fmt?style=flat-square)](https://pypi.org/project/pyproject-fmt)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pyproject-fmt?style=flat-square)](https://pypi.org/project/pyproject-fmt)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/pyproject-fmt?style=flat-square)](https://pypistats.org/packages/pyproject-fmt)\n[![PyPI - License](https://img.shields.io/pypi/l/pyproject-fmt?style=flat-square)](https://opensource.org/licenses/MIT)\n[![check](https://github.com/tox-dev/pyproject-fmt/actions/workflows/check.yml/badge.svg)](https://github.com/tox-dev/pyproject-fmt/actions/workflows/check.yml)\n\nApply a consistent format to `pyproject.toml` files.\n[Read the full documentation here](https://pyproject-fmt.readthedocs.io/en/latest/).\n',
author_email='Bernat Gabor <gaborjbernat@gmail.com>',
classifiers=[
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
install_requires=[
'packaging>=21.3',
'tomlkit>=0.10',
'typing-extensions>=3.10; python_version < "3.8"',
],
extras_require={
'docs': [
'furo>=2022.1.2b11',
'sphinx-argparse-cli>=1.8',
'sphinx-autodoc-typehints>=1.17',
'sphinx-copybutton>=0.5',
'sphinx>=4.4',
],
'test': [
'covdefaults>=2',
'pytest-cov>=3',
'pytest-mock>=3.7',
'pytest>=7',
],
},
entry_points={
'console_scripts': [
'pyproject-fmt = pyproject_fmt.__main__:run',
],
},
packages=[
'pyproject_fmt',
'pyproject_fmt.formatter',
],
package_dir={
'': 'src'
},
)
4 changes: 4 additions & 0 deletions devel/py-pyproject-fmt/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pyproject-fmt applies a consistent format to your pyproject.toml file with
comment support. It can be used as a CLI tool or a pre-commit hook.

WWW: https://github.com/tox-dev/pyproject-fmt

0 comments on commit b0546a5

Please sign in to comment.