git: 70c7afe71d93 - main - devel/py-installer: convert to USE_PYTHON=pep517

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Tue, 07 Feb 2023 01:53:40 UTC
The branch main has been updated by vishwin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=70c7afe71d9353e6f07a2185cff9a0a81587f10c

commit 70c7afe71d9353e6f07a2185cff9a0a81587f10c
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2022-04-06 00:34:42 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2023-02-07 01:53:12 +0000

    devel/py-installer: convert to USE_PYTHON=pep517
    
    This is the second port used to bootstrap PEP-517 tooling and the
    default staging driver for ports built under USE_PYTHON=pep517.
    python@ will be maintaining this going forward as infrastructure.
    
    https://wiki.freebsd.org/Python/PEP-517
    
    With hat: python
    Approved by: maintainer timeout, fluffy (mentor)
    Differential Revision: https://reviews.freebsd.org/D34789
---
 devel/py-installer/Makefile       | 16 +++++++++-------
 devel/py-installer/files/setup.py | 25 -------------------------
 2 files changed, 9 insertions(+), 32 deletions(-)

diff --git a/devel/py-installer/Makefile b/devel/py-installer/Makefile
index 7abd9b144232..37425811b0b3 100644
--- a/devel/py-installer/Makefile
+++ b/devel/py-installer/Makefile
@@ -1,22 +1,24 @@
 PORTNAME=	installer
-PORTVERSION=	0.6.0
+DISTVERSION=	0.6.0
+PORTREVISION=	1
 CATEGORIES=	devel python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
 
-MAINTAINER=	sunpoet@FreeBSD.org
+MAINTAINER=	python@FreeBSD.org
 COMMENT=	Library for installing Python wheels
 WWW=		https://github.com/pypa/installer
 
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		python:3.7+
-USE_PYTHON=	autoplist concurrent distutils
+USES=		python
+USE_PYTHON=	allflavors autoplist concurrent pep517
+PEP517_BUILD_CMD=	${PYTHON_CMD} -m flit_core.wheel
+PEP517_BUILD_DEPEND=	${PYTHON_PKGNAMEPREFIX}flit-core>0:devel/py-flit-core@${PY_FLAVOR}
+PEP517_INSTALL_DEPEND=
+MAKE_ENV+=	PYTHONPATH=${BUILD_WRKSRC}/src
 
 NO_ARCH=	yes
 
-post-patch:
-	@${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py
-
 .include <bsd.port.mk>
diff --git a/devel/py-installer/files/setup.py b/devel/py-installer/files/setup.py
deleted file mode 100644
index 1be788dd310f..000000000000
--- a/devel/py-installer/files/setup.py
+++ /dev/null
@@ -1,25 +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 = \
-['installer', 'installer._scripts']
-
-package_data = \
-{'': ['*']}
-
-package_dir = \
-{'': 'src'}
-
-setup(name='installer',
-      version='%%PORTVERSION%%',
-      description='A library for installing Python wheels.',
-      author=None,
-      author_email='Pradyun Gedam <pradyunsg@gmail.com>',
-      url=None,
-      packages=packages,
-      package_data=package_data,
-      package_dir=package_dir,
-      python_requires='>=3.7',
-     )