git: 04ccdc92b5b9 - main - devel/py-flit-core: convert to self-hosting bootstrap
Date: Tue, 07 Feb 2023 01:21:59 UTC
The branch main has been updated by vishwin: URL: https://cgit.FreeBSD.org/ports/commit/?id=04ccdc92b5b92a05801cacfc6db5bfeeec1e9406 commit 04ccdc92b5b92a05801cacfc6db5bfeeec1e9406 Author: Charlie Li <vishwin@FreeBSD.org> AuthorDate: 2022-04-05 00:32:42 +0000 Commit: Charlie Li <vishwin@FreeBSD.org> CommitDate: 2023-02-07 01:21:34 +0000 devel/py-flit-core: convert to self-hosting bootstrap This is the first port used to bootstrap the rest of the PEP-517 tooling. 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/D34786 --- devel/py-flit-core/Makefile | 19 ++++++++------ devel/py-flit-core/files/setup.py | 53 --------------------------------------- 2 files changed, 11 insertions(+), 61 deletions(-) diff --git a/devel/py-flit-core/Makefile b/devel/py-flit-core/Makefile index 89c75d1f205b..09cd3de506c6 100644 --- a/devel/py-flit-core/Makefile +++ b/devel/py-flit-core/Makefile @@ -1,11 +1,12 @@ PORTNAME= flit-core -PORTVERSION= 3.8.0 +DISTVERSION= 3.8.0 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -DISTNAME= flit_core-${PORTVERSION} +DISTNAME= ${PORTNAME:C/[-_]+/_/g}-${DISTVERSIONFULL} -MAINTAINER= sunpoet@FreeBSD.org +MAINTAINER= python@FreeBSD.org COMMENT= Distribution-building parts of Flit WWW= https://github.com/pypa/flit/tree/main/flit_core @@ -14,12 +15,14 @@ LICENSE_FILE= ${WRKSRC}/LICENSE TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}testpath>=0:devel/py-testpath@${PY_FLAVOR} -USES= python:3.4+ -USE_PYTHON= autoplist concurrent distutils pytest +USES= python +USE_PYTHON= allflavors autoplist concurrent pep517 pytest +PEP517_BUILD_CMD= ${PYTHON_CMD} -m ${PORTNAME:C/[-_]+/_/g}.wheel +PEP517_BUILD_DEPEND= +PEP517_INSTALL_CMD= ${PYTHON_CMD} ${BUILD_WRKSRC}/bootstrap_install.py \ + -i ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} ${BUILD_WRKSRC}/dist/${PORTNAME:C/[-_]+/_/g}-*.whl +PEP517_INSTALL_DEPEND= 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-flit-core/files/setup.py b/devel/py-flit-core/files/setup.py deleted file mode 100644 index 3ae2588ec43e..000000000000 --- a/devel/py-flit-core/files/setup.py +++ /dev/null @@ -1,53 +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 = \ -['flit_core', - 'flit_core.tests', - 'flit_core.tests.samples.imported_version.package1', - 'flit_core.tests.samples.ns1-pkg.ns1.pkg', - 'flit_core.tests.samples.package1', - 'flit_core.tests.samples.package1.subpkg', - 'flit_core.tests.samples.package1.subpkg2', - 'flit_core.vendor', - 'flit_core.vendor.tomli'] - -package_data = \ -{'': ['*'], - 'flit_core.tests': ['samples/*', - 'samples/conflicting_modules/*', - 'samples/conflicting_modules/src/*', - 'samples/constructed_version/*', - 'samples/imported_version/*', - 'samples/inclusion/*', - 'samples/inclusion/LICENSES/*', - 'samples/inclusion/doc/*', - 'samples/inclusion/doc/subdir/*', - 'samples/inclusion/doc/subdir/subsubdir/*', - 'samples/normalization/*', - 'samples/ns1-pkg/*', - 'samples/ns1-pkg/ns1/*', - 'samples/pep517/*', - 'samples/pep621/*', - 'samples/pep621_nodynamic/*', - 'samples/with_data_dir/*', - 'samples/with_data_dir/data/*', - 'samples/with_data_dir/data/share/*', - 'samples/with_data_dir/data/share/man/*', - 'samples/with_data_dir/data/share/man/man1/*'], - 'flit_core.tests.samples.package1': ['data_dir/*'], - 'flit_core.tests.samples.package1.subpkg': ['sp_data_dir/*'], - 'flit_core.vendor': ['tomli-1.2.3.dist-info/*']} - -setup(name='flit_core', - version='%%PORTVERSION%%', - description='Distribution-building parts of Flit. See flit package for more information', - author=None, - author_email='Thomas Kluyver & contributors <thomas@kluyver.me.uk>', - url=None, - packages=packages, - package_data=package_data, - python_requires='>=3.6', - )