git: 750a08a13b68 - main - security/py-argon2-cffi: Convert to USE_PYTHON=pep517

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Tue, 21 Mar 2023 19:29:55 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=750a08a13b681edf61ae9ed6ac7a1a138ebcad78

commit 750a08a13b681edf61ae9ed6ac7a1a138ebcad78
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-03-21 18:47:34 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-03-21 19:21:16 +0000

    security/py-argon2-cffi: Convert to USE_PYTHON=pep517
    
    - Bump PORTREVISION for dependency and package change
---
 security/py-argon2-cffi/Makefile       |  7 +++---
 security/py-argon2-cffi/files/setup.py | 45 ----------------------------------
 2 files changed, 3 insertions(+), 49 deletions(-)

diff --git a/security/py-argon2-cffi/Makefile b/security/py-argon2-cffi/Makefile
index 9427a5c1752d..5adfc1ff8f41 100644
--- a/security/py-argon2-cffi/Makefile
+++ b/security/py-argon2-cffi/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	argon2-cffi
 PORTVERSION=	21.3.0
+PORTREVISION=	1
 CATEGORIES=	security python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
@@ -11,12 +12,13 @@ WWW=		https://argon2-cffi.readthedocs.io/en/stable/
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}flit-core>=3.4<4:devel/py-flit-core@${PY_FLAVOR}
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}argon2-cffi-bindings>=0:security/py-argon2-cffi-bindings@${PY_FLAVOR}
 TEST_DEPENDS=	${PYTHON_PKGNAMEPREFIX}coverage>=5.0.2:devel/py-coverage@${PY_FLAVOR} \
 		${PYTHON_PKGNAMEPREFIX}hypothesis>=0:devel/py-hypothesis@${PY_FLAVOR}
 
 USES=		python:3.6+
-USE_PYTHON=	autoplist concurrent distutils pytest
+USE_PYTHON=	autoplist concurrent pep517 pytest
 
 NO_ARCH=	yes
 TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR}
@@ -27,7 +29,4 @@ TEST_ENV=	PYTHONPATH=${STAGEDIR}${PYTHON_SITELIBDIR}
 RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR}
 .endif
 
-post-patch:
-	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
-
 .include <bsd.port.post.mk>
diff --git a/security/py-argon2-cffi/files/setup.py b/security/py-argon2-cffi/files/setup.py
deleted file mode 100644
index a804b1fcb68e..000000000000
--- a/security/py-argon2-cffi/files/setup.py
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env python
-# setup.py generated by flit for tools that don't yet use PEP 517
-
-from distutils.core import setup
-
-packages = \
-['argon2']
-
-package_data = \
-{'': ['*']}
-
-package_dir = \
-{'': 'src'}
-
-install_requires = \
-['argon2-cffi-bindings']
-
-extras_require = \
-{":python_version < '3.7'": ['dataclasses'],
- ":python_version < '3.8'": ['typing-extensions'],
- 'dev': ['pre-commit',
-         'cogapp',
-         'tomli',
-         'coverage[toml]>=5.0.2',
-         'hypothesis',
-         'pytest',
-         'sphinx',
-         'sphinx-notfound-page',
-         'furo'],
- 'docs': ['sphinx', 'sphinx-notfound-page', 'furo'],
- 'tests': ['coverage[toml]>=5.0.2', 'hypothesis', 'pytest']}
-
-setup(name='argon2-cffi',
-      version='%%PORTVERSION%%',
-      description='The secure Argon2 password hashing algorithm.',
-      author=None,
-      author_email='Hynek Schlawack <hs@ox.cx>',
-      url=None,
-      packages=packages,
-      package_data=package_data,
-      package_dir=package_dir,
-      install_requires=install_requires,
-      extras_require=extras_require,
-      python_requires='>=3.6',
-     )