git: b0546a57c6d7 - main - devel/py-pyproject-fmt: Add py-pyproject-fmt 0.3.3
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 21 Jun 2022 16:36:58 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=b0546a57c6d7c08f1268148d5529d8f6c3bcb428
commit b0546a57c6d7c08f1268148d5529d8f6c3bcb428
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-06-21 16:32:26 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-06-21 16:32:26 +0000
devel/py-pyproject-fmt: Add py-pyproject-fmt 0.3.3
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
---
devel/Makefile | 1 +
devel/py-pyproject-fmt/Makefile | 34 +++++++++++++++++++++++
devel/py-pyproject-fmt/distinfo | 3 ++
devel/py-pyproject-fmt/files/setup.py | 52 +++++++++++++++++++++++++++++++++++
devel/py-pyproject-fmt/pkg-descr | 4 +++
5 files changed, 94 insertions(+)
diff --git a/devel/Makefile b/devel/Makefile
index f8b223c58fa3..6ef530689654 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -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
diff --git a/devel/py-pyproject-fmt/Makefile b/devel/py-pyproject-fmt/Makefile
new file mode 100644
index 000000000000..6f9a93de8fb1
--- /dev/null
+++ b/devel/py-pyproject-fmt/Makefile
@@ -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>
diff --git a/devel/py-pyproject-fmt/distinfo b/devel/py-pyproject-fmt/distinfo
new file mode 100644
index 000000000000..2aa057d15131
--- /dev/null
+++ b/devel/py-pyproject-fmt/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1655561122
+SHA256 (pyproject_fmt-0.3.3.tar.gz) = 7ca6b102c8717a77e1f567daa74f2555a22554ae2edeed672f94cc682da99763
+SIZE (pyproject_fmt-0.3.3.tar.gz) = 9731
diff --git a/devel/py-pyproject-fmt/files/setup.py b/devel/py-pyproject-fmt/files/setup.py
new file mode 100644
index 000000000000..d2292ff1044a
--- /dev/null
+++ b/devel/py-pyproject-fmt/files/setup.py
@@ -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[](https://pypi.org/project/pyproject-fmt)\n[](https://pypi.org/project/pyproject-fmt)\n[](https://pypi.org/project/pyproject-fmt)\n[](https://pypistats.org/packages/pyproject-fmt)\n[](https://opensource.org/licenses/MIT)\n[](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'
+ },
+)
diff --git a/devel/py-pyproject-fmt/pkg-descr b/devel/py-pyproject-fmt/pkg-descr
new file mode 100644
index 000000000000..2976ff0368e3
--- /dev/null
+++ b/devel/py-pyproject-fmt/pkg-descr
@@ -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