aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharlie Li <vishwin@FreeBSD.org>2023-03-09 17:33:37 +0000
committerCharlie Li <vishwin@FreeBSD.org>2023-03-09 17:35:49 +0000
commit46a71ea3bf0004075ed438ebf49af255fe942b89 (patch)
treed1eca52232c148375272ce8497a7b7f26dc98cfe
parent1b875d392cf5023d447f071a9743eaacec4d8ff5 (diff)
python.mk: introduce PY_SETUPTOOLS
Selects the correct setuptools port based on USE_PYTHON=distutils or not. devel/py-setuptools58 case currently commented out.
-rw-r--r--Mk/Uses/python.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index 5e3e2e1add4c..edf56e387102 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -286,6 +286,7 @@
#
# Dependency lines of selected Python modules:
#
+# PY_SETUPTOOLS - setuptools port based on USE_PYTHON=distutils
# PYGAME - pygame port
# PYNUMPY - NumPy port
# PY_MERCURIAL - mercurial port, PKGNAME varies based on default
@@ -778,6 +779,17 @@ CMAKE_ARGS+= -DPython_ADDITIONAL_VERSIONS=${PYTHON_VER}
PYGAME= ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game@${PY_FLAVOR}
PYNUMPY= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16,1<1.25,1:math/py-numpy@${PY_FLAVOR}
+. if defined(_PYTHON_FEATURE_DISTUTILS)
+. if ${PYTHON_MAJOR_VER} < 3
+PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools44>0:devel/py-setuptools44@${PY_FLAVOR}
+. else
+#PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools58>0:devel/py-setuptools58@${PY_FLAVOR}
+PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR}
+. endif
+. else
+PY_SETUPTOOLS= ${PYTHON_PKGNAMEPREFIX}setuptools>0:devel/py-setuptools@${PY_FLAVOR}
+. endif
+
# Common Python modules that can be needed but only for some versions of Python.
. if ${PYTHON_REL} < 30500
. else