aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Li <vishwin@FreeBSD.org>2026-04-15 03:46:55 +0000
committerCharlie Li <vishwin@FreeBSD.org>2026-04-15 03:46:55 +0000
commit81dc803e2ce2f36cac6105165a663b250aea9f01 (patch)
tree410ef3c265035757daae3bcbd2af012651ddf521
parent716e7ab7b2d0c2753d1cca2f7a45a656fb82be17 (diff)
python.mk: deprecate USE_PYTHON=distutils
setup.py as a command line tool is deprecated. Still a valid configuration file for setuptools in USE_PYTHON=pep517 mode. More information: https://packaging.python.org/en/latest/discussions/setup-py-deprecated/
-rw-r--r--Mk/Uses/python.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index 1312ac53c96a..5660741d4b62 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -117,6 +117,9 @@
# distutils - Use distutils as do-configure, do-build and
# do-install targets. implies flavors.
#
+# Deprecated in favour of pep517, functionality to be
+# removed in a future setuptools.
+#
# pep517 - Follow the PEP-517 standard to build and install wheels
# as do-build and do-install targets. implies flavors.
#
@@ -708,6 +711,7 @@ _CURRENTPORT:= ${PKGNAMEPREFIX}${PORTNAME}${PKGNAMESUFFIX}
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools44>0:devel/py-setuptools44@${PY_FLAVOR}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools44>0:devel/py-setuptools44@${PY_FLAVOR}
. else
+DEV_WARNING+= "USE_PYTHON=distutils is deprecated, setup.py as a command line tool is deprecated and the ability to use it as such will be removed in a future setuptools. As setup.py is still a valid configuration file for setuptools, please migrate to USE_PYTHON=pep517 with setuptools in BUILD_DEPENDS."
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${PY_FLAVOR}
. endif
. endif