git: 9ef210b6cd70 - main - Mk/Uses/python.mk: Remove PYTHON3_DEFAULT and use PYTHON_DEFAULT instead
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 30 Sep 2023 00:56:50 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=9ef210b6cd70dc7713a857618b28faf4e63b7b73
commit 9ef210b6cd70dc7713a857618b28faf4e63b7b73
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2023-09-30 00:30:47 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2023-09-30 00:46:32 +0000
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.
---
Mk/Uses/python.mk | 10 +++-------
1 file 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)