aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-03-21 18:45:12 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-03-21 19:20:58 +0000
commit7d376cad030a48d2fdeb2cbcd2c1f5817665d182 (patch)
treeb51b58187eb3fbd329ebf4467fd8082882545651
parentc5241d33597015233885984fbadb3178614e83a7 (diff)
downloadports-7d376cad030a48d2fdeb2cbcd2c1f5817665d182.tar.gz
ports-7d376cad030a48d2fdeb2cbcd2c1f5817665d182.zip
devel/py-pyproject-fmt: Convert to USE_PYTHON=pep517
- Bump PORTREVISION for dependency and package change
-rw-r--r--devel/py-pyproject-fmt/Makefile9
-rw-r--r--devel/py-pyproject-fmt/files/setup.py51
2 files changed, 4 insertions, 56 deletions
diff --git a/devel/py-pyproject-fmt/Makefile b/devel/py-pyproject-fmt/Makefile
index 7db28f82fa51..44b97bb776ca 100644
--- a/devel/py-pyproject-fmt/Makefile
+++ b/devel/py-pyproject-fmt/Makefile
@@ -1,5 +1,6 @@
PORTNAME= pyproject-fmt
PORTVERSION= 0.5.0
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -12,11 +13,13 @@ WWW= https://github.com/tox-dev/pyproject-fmt
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hatch-vcs>=0.2:devel/py-hatch-vcs@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}hatchling>=1.11.1:devel/py-hatchling@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}packaging>=21.3:devel/py-packaging@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}tomlkit>=0.11.6:textproc/py-tomlkit@${PY_FLAVOR}
USES= python:3.7+
-USE_PYTHON= autoplist concurrent distutils
+USE_PYTHON= autoplist concurrent pep517
NO_ARCH= yes
@@ -26,8 +29,4 @@ NO_ARCH= yes
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.4: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/files/setup.py b/devel/py-pyproject-fmt/files/setup.py
deleted file mode 100644
index 6ec5ab87afd5..000000000000
--- a/devel/py-pyproject-fmt/files/setup.py
+++ /dev/null
@@ -1,51 +0,0 @@
-# -*- 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.7',
- 'Programming Language :: Python :: 3.8',
- 'Programming Language :: Python :: 3.9',
- 'Programming Language :: Python :: 3.10',
- 'Programming Language :: Python :: 3.11',
- ],
- install_requires=[
- 'packaging>=21.3',
- 'tomlkit>=0.11.6',
- 'typing-extensions>=4.4; python_version < "3.8"',
- ],
- extras_require={
- 'docs': [
- 'furo>=2022.9.29',
- 'sphinx-argparse-cli>=1.10',
- 'sphinx-autodoc-typehints>=1.19.4',
- 'sphinx-copybutton>=0.5',
- 'sphinx>=5.3',
- ],
- 'test': [
- 'covdefaults>=2.2',
- 'pytest-cov>=4',
- 'pytest-mock>=3.10',
- 'pytest>=7.2',
- ],
- },
- entry_points={
- 'console_scripts': [
- 'pyproject-fmt = pyproject_fmt.__main__:run',
- ],
- },
- packages=[
- 'pyproject_fmt',
- 'pyproject_fmt.formatter',
- ],
- package_dir={'': 'src'},
-)