git: 78d3d0be394e - main - Mk/Uses/python.mk: Fix 34852a28b2b09ceb1b52db7ac15a192089c5e60c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 07 May 2023 16:17:51 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=78d3d0be394eb329f898017589877e1f2b3281f1 commit 78d3d0be394eb329f898017589877e1f2b3281f1 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2023-05-07 16:17:26 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2023-05-07 16:17:26 +0000 Mk/Uses/python.mk: Fix 34852a28b2b09ceb1b52db7ac15a192089c5e60c PYTHON3_DEFAULT removal is planned for a PR. --- Mk/Uses/python.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index 74660df56a51..c39591cd7bf3 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -390,6 +390,10 @@ _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 @@ -433,7 +437,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 ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${_PYTHON_VERSIONS} +. for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} . if !defined(_PYTHON_VERSION) && \ !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ @@ -451,7 +455,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} ${_PYTHON_VERSIONS} +. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} . if !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ ${__VER:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}})) && \ @@ -473,7 +477,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} +. for _v in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} _f= py${_v:S/.//} . if ${_ALL_PYTHON_FLAVORS:M${_f}} && !${FLAVORS:M${_f}} . if !empty(FLAVORS)