git: e7cfa3158cd4 - main - devel/py-build: Convert to USE_PYTHON=pep517
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 12 Feb 2023 18:46:23 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=e7cfa3158cd49aa3ef4d6c4632c6b9d0bbce1c74 commit e7cfa3158cd49aa3ef4d6c4632c6b9d0bbce1c74 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-02-12 18:36:48 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-02-12 18:36:48 +0000 devel/py-build: Convert to USE_PYTHON=pep517 - Add build for all Python flavors/versions (USE_PYTHON=allflavors) - Bump PORTREVISION for dependency and package change --- devel/py-build/Makefile | 11 ++++---- devel/py-build/files/setup.py | 59 ------------------------------------------- 2 files changed, 6 insertions(+), 64 deletions(-) diff --git a/devel/py-build/Makefile b/devel/py-build/Makefile index 3f83236c3cdb..e92f5a0f20ac 100644 --- a/devel/py-build/Makefile +++ b/devel/py-build/Makefile @@ -1,5 +1,6 @@ PORTNAME= build PORTVERSION= 0.10.0 +PORTREVISION= 1 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} @@ -14,11 +15,14 @@ LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}packaging>=19.0:devel/py-packaging@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyproject_hooks>=0:devel/py-pyproject_hooks@${PY_FLAVOR} -USES= python:3.7+ -USE_PYTHON= autoplist concurrent distutils +USES= python +USE_PYTHON= allflavors autoplist concurrent pep517 NO_ARCH= yes +PEP517_BUILD_CMD= ${PYTHON_CMD} -m flit_core.wheel +PEP517_BUILD_DEPEND= ${PYTHON_PKGNAMEPREFIX}flit-core>=3.4:devel/py-flit-core@${PY_FLAVOR} + .include <bsd.port.pre.mk> .if ${PYTHON_REL} < 30800 @@ -29,7 +33,4 @@ RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0.22:devel/py-importlib RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}tomli>=1.1.0:textproc/py-tomli@${PY_FLAVOR} .endif -post-patch: - @${SED} -e 's|%%PORTVERSION%%|${PORTVERSION}|' ${FILESDIR}/setup.py > ${WRKSRC}/setup.py - .include <bsd.port.post.mk> diff --git a/devel/py-build/files/setup.py b/devel/py-build/files/setup.py deleted file mode 100644 index 0fe44296b904..000000000000 --- a/devel/py-build/files/setup.py +++ /dev/null @@ -1,59 +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 = \ -['build'] - -package_data = \ -{'': ['*']} - -package_dir = \ -{'': 'src'} - -install_requires = \ -['packaging >= 19.0', 'pyproject_hooks'] - -extras_require = \ -{':os_name == "nt"': ['colorama'], - ':python_version < "3.11"': ['tomli >= 1.1.0'], - ':python_version < "3.8"': ['importlib-metadata >= 0.22'], - 'docs': ['furo >= 2021.08.31', - 'sphinx ~= 4.0', - 'sphinx-argparse-cli >= 1.5', - 'sphinx-autodoc-typehints >= 1.10'], - 'test': ['filelock >= 3', - 'pytest >= 6.2.4', - 'pytest-cov >= 2.12', - 'pytest-mock >= 2', - 'pytest-rerunfailures >= 9.1', - 'pytest-xdist >= 1.34', - 'toml >= 0.10.0', - 'wheel >= 0.36.0'], - 'test:python_version < "3.10"': ['setuptools >= 42.0.0'], - 'test:python_version >= "3.10"': ['setuptools >= 56.0.0'], - 'typing': ['importlib-metadata >= 5.1', - 'mypy == 0.991', - 'tomli', - 'typing-extensions >= 3.7.4.3'], - 'virtualenv': ['virtualenv >= 20.0.35']} - -entry_points = \ -{'console_scripts': ['pyproject-build = build.__main__:entrypoint'], - 'pipx.run': ['build = build.__main__:entrypoint']} - -setup(name='build', - version='%%PORTVERSION%%', - description='A simple, correct Python build frontend', - author=None, - author_email='Filipe Laíns <lains@riseup.net>, Bernát Gábor <gaborjbernat@gmail.com>, layday <layday@protonmail.com>, Henry Schreiner <henryschreineriii@gmail.com>', - url=None, - packages=packages, - package_data=package_data, - package_dir=package_dir, - install_requires=install_requires, - extras_require=extras_require, - entry_points=entry_points, - python_requires='>= 3.7', - )