aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-03-21 18:44:54 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-03-21 19:20:54 +0000
commit5e3aad6add5cca0070e3d10d66b3bd822d15db0c (patch)
treed673744e5bba5c1fb2ddec0523ed707794d3bad1
parenta46b99addfda8ebd8d3f29436f24c37402808119 (diff)
downloadports-5e3aad6add5cca0070e3d10d66b3bd822d15db0c.tar.gz
ports-5e3aad6add5cca0070e3d10d66b3bd822d15db0c.zip
devel/py-pdm: Convert to USE_PYTHON=pep517
- Bump PORTREVISION for dependency and package change
-rw-r--r--devel/py-pdm/Makefile8
-rw-r--r--devel/py-pdm/files/setup.py79
2 files changed, 3 insertions, 84 deletions
diff --git a/devel/py-pdm/Makefile b/devel/py-pdm/Makefile
index af7c47bb0480..4d782110966a 100644
--- a/devel/py-pdm/Makefile
+++ b/devel/py-pdm/Makefile
@@ -1,5 +1,6 @@
PORTNAME= pdm
PORTVERSION= 2.2.1
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -11,6 +12,7 @@ WWW= https://github.com/pdm-project/pdm
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pdm-pep517>=1.0:devel/py-pdm-pep517@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}blinker>=0:devel/py-blinker@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}CacheControl>=0.12.11:www/py-cachecontrol@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}certifi>=2022.6.15:security/py-certifi@${PY_FLAVOR} \
@@ -30,7 +32,7 @@ RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}blinker>=0:devel/py-blinker@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}virtualenv>=20:devel/py-virtualenv@${PY_FLAVOR}
USES= python:3.7+
-USE_PYTHON= autoplist concurrent distutils
+USE_PYTHON= autoplist concurrent pep517
NO_ARCH= yes
@@ -48,8 +50,4 @@ RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=3.6:devel/py-importlib-
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tomli>=1.1.0:textproc/py-tomli@${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-pdm/files/setup.py b/devel/py-pdm/files/setup.py
deleted file mode 100644
index 03a76a3b28f7..000000000000
--- a/devel/py-pdm/files/setup.py
+++ /dev/null
@@ -1,79 +0,0 @@
-# -*- coding: utf-8 -*-
-from setuptools import setup
-
-import codecs
-
-with codecs.open('README.md', encoding="utf-8") as fp:
- long_description = fp.read()
-INSTALL_REQUIRES = [
- 'blinker',
- 'cachecontrol>=0.12.11',
- 'certifi>=2022.6.15',
- 'findpython>=0.2.0',
- 'importlib-metadata>=3.6; python_version < "3.10"',
- 'installer<0.7,>=0.6',
- 'packaging>=20.9',
- 'pdm-pep517<2.0.0,>=1.0.0',
- 'pep517>=0.11.0',
- 'platformdirs',
- 'python-dotenv>=0.15',
- 'requests-toolbelt',
- 'resolvelib<0.9,>=0.8',
- 'rich>=12.3.0',
- 'shellingham>=1.3.2',
- 'tomli>=1.1.0; python_version < "3.11"',
- 'tomlkit<1,>=0.8.0',
- 'typing-extensions; python_version < "3.8"',
- 'unearth>=0.6.0',
- 'virtualenv>=20',
-]
-ENTRY_POINTS = {
- 'console_scripts': [
- 'pdm = pdm.core:main',
- ],
-}
-
-setup_kwargs = {
- 'name': 'pdm',
- 'version': '%%PORTVERSION%%',
- 'description': 'A modern Python package and dependency manager supporting the latest PEP standards',
- 'long_description': long_description,
- 'license': 'MIT',
- 'author': '',
- 'author_email': 'frostming <mianghong@gmail.com>',
- 'maintainer': None,
- 'maintainer_email': None,
- 'url': '',
- 'packages': [
- 'pdm.builders',
- 'pdm.cli',
- 'pdm.cli.commands',
- 'pdm.cli.commands.publish',
- 'pdm.cli.commands.venv',
- 'pdm.cli.completions',
- 'pdm.formats',
- 'pdm.installers',
- 'pdm.models',
- 'pdm.models.in_process',
- 'pdm.pep582',
- 'pdm.project',
- 'pdm.resolver',
- ],
- 'package_dir': {'': 'src'},
- 'package_data': {'': ['*']},
- 'long_description_content_type': 'text/markdown',
- 'keywords': ['packaging', 'dependency', 'workflow'],
- 'classifiers': [
- 'Programming Language :: Python :: 3',
- 'Programming Language :: Python :: 3.7',
- 'Programming Language :: Python :: 3.8',
- 'Programming Language :: Python :: 3.9',
- 'Programming Language :: Python :: 3.10',
- 'Topic :: Software Development :: Build Tools',
- ],
- 'install_requires': INSTALL_REQUIRES,
- 'python_requires': '>=3.7',
- 'entry_points': ENTRY_POINTS,
-}
-
-setup(**setup_kwargs)