aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-09-30 00:30:47 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-09-30 00:46:32 +0000
commit9ef210b6cd70dc7713a857618b28faf4e63b7b73 (patch)
tree65ab82a09103154b1779071fe31866ac32ad1f4f
parent204d12db0162d8e28c3ff536da2be7b0dc35850e (diff)
downloadports-9ef210b6cd70dc7713a857618b28faf4e63b7b73.tar.gz
ports-9ef210b6cd70dc7713a857618b28faf4e63b7b73.zip
Mk/Uses/python.mk: Remove PYTHON3_DEFAULT and use PYTHON_DEFAULT instead
- Remove unnecessary PYTHON3_DEFAULT - Replace PYTHON3_DEFAULT with PYTHON_DEFAULT Regarding DEFAULT_VERSIONS, both python and python3 point to the same value which makes python3 a duplicate. And we do not really support python=2.7. Therefore, use python for Python 3.x and python2 for legacy Python 2.7.
-rw-r--r--Mk/Uses/python.mk10
1 files changed, 3 insertions, 7 deletions
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index b65b2150f214..69ecd5f5a2ab 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -415,10 +415,6 @@ _PYTHON_RUN_DEP= yes
_PYTHON_TEST_DEP= yes
. endif
-. if ${PYTHON2_DEFAULT} != ${PYTHON_DEFAULT} && ${PYTHON3_DEFAULT} != ${PYTHON_DEFAULT}
-WARNING+= "PYTHON_DEFAULT must be a version present in PYTHON2_DEFAULT or PYTHON3_DEFAULT, if you want more Python flavors, set BUILD_ALL_PYTHON_FLAVORS in your make.conf"
-. endif
-
. if ${_PYTHON_ARGS} == 2.7
DEV_WARNING+= "lang/python27 reached End of Life and will be removed somewhere in the future, please convert to a modern version of python"
. elif ${_PYTHON_ARGS} == 2
@@ -462,7 +458,7 @@ _PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MAXIMUM} at most
# If we have an unsupported version of Python, try another.
. if defined(_PYTHON_VERSION_NONSUPPORTED)
.undef _PYTHON_VERSION
-. for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS}
+. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${_PYTHON_VERSIONS}
__VER= ${ver}
. if !defined(_PYTHON_VERSION) && \
!(!empty(_PYTHON_VERSION_MINIMUM) && ( \
@@ -480,7 +476,7 @@ IGNORE= needs an unsupported version of Python
# Automatically generates FLAVORS if empty
. if empty(FLAVORS) && defined(_PYTHON_FEATURE_FLAVORS)
. undef _VALID_PYTHON_VERSIONS
-. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS}
+. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${_PYTHON_VERSIONS}
__VER= ${ver}
. if !(!empty(_PYTHON_VERSION_MINIMUM) && ( \
${__VER:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}})) && \
@@ -502,7 +498,7 @@ _ALL_PYTHON_FLAVORS= ${_PYTHON_VERSIONS:S/.//:S/^/py/}
. if defined(BUILD_ALL_PYTHON_FLAVORS) || defined(_PYTHON_FEATURE_ALLFLAVORS)
FLAVORS= ${_ALL_PYTHON_FLAVORS}
. else
-. for _v in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT}
+. for _v in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT}
_f= py${_v:S/.//}
. if ${_ALL_PYTHON_FLAVORS:M${_f}} && !${FLAVORS:M${_f}}
. if !empty(FLAVORS)