aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorCharlie Li <vishwin@FreeBSD.org>2023-03-27 05:03:51 +0000
committerCharlie Li <vishwin@FreeBSD.org>2023-03-27 05:03:51 +0000
commit33333715d11b23ec7140b3cc6f377223a224853b (patch)
tree388331a4baf14b942bec759bf9cd6971bb5b0446 /Mk
parenta4d616aff9421cef1ce84d390422a567f82968f6 (diff)
downloadports-33333715d11b23ec7140b3cc6f377223a224853b.tar.gz
ports-33333715d11b23ec7140b3cc6f377223a224853b.zip
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)
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/python.mk11
1 files 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}