aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-03-21 18:42:23 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-03-21 19:20:28 +0000
commit58847ae981628ee8149cf5e372906a03311a9e97 (patch)
tree56c05f27300bef081fba4bdfef6c6e905c12ec6b
parentd8040d8677d5a75f9fe93ffec041f6f703e214bb (diff)
downloadports-58847ae981628ee8149cf5e372906a03311a9e97.tar.gz
ports-58847ae981628ee8149cf5e372906a03311a9e97.zip
devel/py-pycomplete: Convert to USE_PYTHON=pep517
- Bump PORTREVISION for dependency and package change
-rw-r--r--devel/py-pycomplete/Makefile9
-rw-r--r--devel/py-pycomplete/files/patch-pyproject.toml18
-rw-r--r--devel/py-pycomplete/files/setup.py49
3 files changed, 22 insertions, 54 deletions
diff --git a/devel/py-pycomplete/Makefile b/devel/py-pycomplete/Makefile
index 12707fdc9335..ef75c18b5945 100644
--- a/devel/py-pycomplete/Makefile
+++ b/devel/py-pycomplete/Makefile
@@ -1,5 +1,6 @@
PORTNAME= pycomplete
PORTVERSION= 0.3.2
+PORTREVISION= 1
CATEGORIES= devel python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -11,13 +12,11 @@ WWW= https://github.com/frostming/pycomplete
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pdm-pep517>=0:devel/py-pdm-pep517@${PY_FLAVOR}
+
USES= python:3.7+
-USE_PYTHON= autoplist concurrent distutils
+USE_PYTHON= autoplist concurrent pep517
NO_ARCH= yes
-post-patch:
- @${RM} ${WRKSRC}/pyproject.toml
- @${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
-
.include <bsd.port.mk>
diff --git a/devel/py-pycomplete/files/patch-pyproject.toml b/devel/py-pycomplete/files/patch-pyproject.toml
new file mode 100644
index 000000000000..f770a0ae7e6a
--- /dev/null
+++ b/devel/py-pycomplete/files/patch-pyproject.toml
@@ -0,0 +1,18 @@
+--- pyproject.toml.orig 2020-12-25 01:46:37 UTC
++++ pyproject.toml
+@@ -8,15 +8,10 @@ build-backend = "pdm.pep517.api"
+ authors = [
+ {name = "Frost Ming", email = "mianghong@gmail.com"},
+ ]
+-dynamic = ["version", "classifiers"]
+ version = "0.3.2"
+ requires-python = ">=3.6"
+ license = {text = "BSD-3-Clause"}
+ dependencies = []
+-dev-dependencies = [
+- "pytest<7.0.0,>=6.1.1",
+- "click<8.0.0,>=7.1.2",
+-]
+ name = "pycomplete"
+ description = "A Python library to generate static completion scripts for your CLI app"
+ readme = "README.md"
diff --git a/devel/py-pycomplete/files/setup.py b/devel/py-pycomplete/files/setup.py
deleted file mode 100644
index 16ebe8808b52..000000000000
--- a/devel/py-pycomplete/files/setup.py
+++ /dev/null
@@ -1,49 +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 = [
-]
-EXTRAS_REQUIRE = {
- 'dev': [
- 'pytest<7.0.0,>=6.1.1',
- 'click<8.0.0,>=7.1.2',
- ],
-}
-ENTRY_POINTS = {
- 'console_scripts': [
- 'pycomplete = pycomplete.__main__:main',
- ],
-}
-
-setup_kwargs = {
- 'name': 'pycomplete',
- 'version': '%%PORTVERSION%%',
- 'description': 'A Python library to generate static completion scripts for your CLI app',
- 'long_description': long_description,
- 'license': 'BSD-3-Clause',
- 'author': '',
- 'author_email': 'Frost Ming <mianghong@gmail.com>',
- 'maintainer': None,
- 'maintainer_email': None,
- 'url': '',
- 'packages': [
- 'pycomplete',
- 'pycomplete.templates',
- ],
- 'package_data': {'': ['*']},
- 'long_description_content_type': 'text/markdown',
- 'keywords': ['cli', 'shell'],
- 'classifiers': [
- 'Development Status :: 3 - Alpha',
- ],
- 'install_requires': INSTALL_REQUIRES,
- 'extras_require': EXTRAS_REQUIRE,
- 'python_requires': '>=3.6',
- 'entry_points': ENTRY_POINTS,
-}
-
-setup(**setup_kwargs)