git: 33333715d11b - main - python.mk: use gpep517 as build frontend on Python 3.7
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Mar 2023 05:09:38 UTC
The branch main has been updated by vishwin:
URL: https://cgit.FreeBSD.org/ports/commit/?id=33333715d11b23ec7140b3cc6f377223a224853b
commit 33333715d11b23ec7140b3cc6f377223a224853b
Author: Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2023-03-27 05:03:51 +0000
Commit: Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2023-03-27 05:03:51 +0000
python.mk: use gpep517 as build frontend on Python 3.7
Should start allowing PEP-517 packages to build and unbreaking
circular dependencies, however short a shelf life, due to gpep517's
almost nonexistant Python dependency tree.
(PyPA build will continue as the preferred build frontend otherwise,
due to official stewardship, but does not preclude a DEFAULT_VERSIONS
hook in the future)
---
Mk/Uses/python.mk | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index 59e11f95bf97..688736ffefe7 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -142,9 +142,11 @@
#
# PEP517_BUILD_CMD - Command sequence for a PEP-517 build frontend that builds a wheel.
# default: ${PYTHON_CMD} -m build --no-isolation --wheel ${PEP517_BUILD_CONFIG_SETTING}
+# Python 3.7: gpep517-${PYTHON_VER} build-wheel --output-fd 1 --wheel-dir ${BUILD_WRKSRC}/dist
#
# PEP517_BUILD_DEPEND - Port needed to execute ${PEP517_BUILD_CMD}.
-# default: ${PYTHON_PKGNAMEPREFIX}build>0:devel/py-build@${PY_FLAVOR}
+# default: ${PYTHON_PKGNAMEPREFIX}build>=0:devel/py-build@${PY_FLAVOR}
+# Python 3.7: ${PYTHON_PKGNAMEPREFIX}gpep517>=0:devel/py-gpep517@${PY_FLAVOR}
#
# PEP517_BUILD_CONFIG_SETTING
# - Options for the build backend. Must include -C or --config-setting per option.
@@ -154,7 +156,7 @@
# default: ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --no-compile-bytecode --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.whl
#
# PEP517_INSTALL_DEPEND - Port needed to execute ${PEP517_INSTALL_CMD}.
-# default: ${PYTHON_PKGNAMEPREFIX}installer>0:devel/py-installer@${PY_FLAVOR}
+# default: ${PYTHON_PKGNAMEPREFIX}installer>=0:devel/py-installer@${PY_FLAVOR}
#
# PYSETUP - Name of the setup script used by the distutils
# package.
@@ -678,8 +680,13 @@ PYDISTUTILS_EGGINFO?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_
PYDISTUTILS_EGGINFODIR?=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
# PEP-517 support
+. if ${PYTHON_REL} < 30800
+PEP517_BUILD_CMD?= gpep517-${PYTHON_VER} build-wheel --output-fd 1 --wheel-dir ${BUILD_WRKSRC}/dist
+PEP517_BUILD_DEPEND?= ${PYTHON_PKGNAMEPREFIX}gpep517>=0:devel/py-gpep517@${PY_FLAVOR}
+. else
PEP517_BUILD_CMD?= ${PYTHON_CMD} -m build --no-isolation --wheel ${PEP517_BUILD_CONFIG_SETTING}
PEP517_BUILD_DEPEND?= ${PYTHON_PKGNAMEPREFIX}build>=0:devel/py-build@${PY_FLAVOR}
+. endif
PEP517_INSTALL_CMD?= ${PYTHON_CMD} -m installer --destdir ${STAGEDIR} --no-compile-bytecode --prefix ${PREFIX} ${BUILD_WRKSRC}/dist/${PORTNAME:C|[-_]+|_|g}-${DISTVERSION}*.whl
PEP517_INSTALL_DEPEND?= ${PYTHON_PKGNAMEPREFIX}installer>=0:devel/py-installer@${PY_FLAVOR}