git: a1039fe12a28 - main - python.mk: add PEP517_BUILD_CONFIG_SETTING

From: Charlie Li <vishwin_at_FreeBSD.org>
Date: Thu, 09 Mar 2023 04:35:28 UTC
The branch main has been updated by vishwin:

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

commit a1039fe12a2882341f1b7e97cbe50339860c3092
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2023-03-09 04:33:35 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2023-03-09 04:34:38 +0000

    python.mk: add PEP517_BUILD_CONFIG_SETTING
    
    Reference: https://pypa-build.readthedocs.io/en/latest/#python--m-build---config-setting
---
 Mk/Uses/python.mk | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index 901261333b87..21d38f4775ad 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -141,11 +141,15 @@
 #			  default: ${PYTHONBASE}/bin/${PYTHON_VERSION}
 #
 # PEP517_BUILD_CMD	- Command sequence for a PEP-517 build frontend that builds a wheel.
-#			  default: ${PYTHON_CMD} -m build -n -w
+#			  default: ${PYTHON_CMD} -m build -n -w ${PEP517_BUILD_CONFIG_SETTING}
 #
 # PEP517_BUILD_DEPEND	- Port needed to execute ${PEP517_BUILD_CMD}.
 #			  default: ${PYTHON_PKGNAMEPREFIX}build>0:devel/py-build@${PY_FLAVOR}
 #
+# PEP517_BUILD_CONFIG_SETTING
+#			- Options for the build backend. Must include -C or --config-setting per option.
+#			  default: <empty>
+#
 # PEP517_INSTALL_CMD	- Command sequence for a PEP-517 install frontend that installs a wheel.
 #			  default: ${PYTHON_CMD} -m installer -d ${STAGEDIR} -p ${PREFIX} --no-compile-bytecode ${BUILD_WRKSRC}/dist/${PORTNAME:C/[-_]+/_/g}-${PORTVERSION}-*.whl
 #
@@ -673,7 +677,7 @@ PYDISTUTILS_EGGINFO?=	${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_
 PYDISTUTILS_EGGINFODIR?=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
 
 # PEP-517 support
-PEP517_BUILD_CMD?=	${PYTHON_CMD} -m build -n -w
+PEP517_BUILD_CMD?=	${PYTHON_CMD} -m build -n -w ${PEP517_BUILD_CONFIG_SETTING}
 PEP517_BUILD_DEPEND?=	${PYTHON_PKGNAMEPREFIX}build>0:devel/py-build@${PY_FLAVOR}
 PEP517_INSTALL_CMD?=	${PYTHON_CMD} -m installer -d ${STAGEDIR} -p ${PREFIX} --no-compile-bytecode ${BUILD_WRKSRC}/dist/${PORTNAME:C/[-_]+/_/g}-${PORTVERSION}-*.whl
 PEP517_INSTALL_DEPEND?=	${PYTHON_PKGNAMEPREFIX}installer>0:devel/py-installer@${PY_FLAVOR}