diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk index ceb6e8d..196bdfa 100644 --- a/Mk/Uses/python.mk +++ b/Mk/Uses/python.mk @@ -33,14 +33,6 @@ # RUN_DEPENDS and TEST_DEPENDS. PYTHON_NO_DEPENDS can be set to not add any # dependencies. # -# Variables, which can be set by a user: -# -# PYTHON_VERSION - The chosen Python interpreter including the version, -# e.g. python2.7, python3.3, etc. This allows the user -# to override the currently chosen default version and -# to install the port for a specific Python version. -# It must not be set by a port. -# # Variables, which can be set by the port: # # USE_PYTHON - A list of additional features and functionality to @@ -201,6 +193,7 @@ # Deprecated variables, which exist for compatibility and will be removed # soon: # +# PYTHON_VERSION # PYTHON_DEFAULT_VERSION # PYTHON2_DEFAULT_VERSION # PYTHON3_DEFAULT_VERSION @@ -272,6 +265,9 @@ WARNING+= "PYTHON2_DEFAULT_VERSION is defined, consider using DEFAULT_VERSIONS=p .if defined(PYTHON3_DEFAULT_VERSION) WARNING+= "PYTHON3_DEFAULT_VERSION is defined, consider using DEFAULT_VERSIONS=python3=${PYTHON3_DEFAULT_VERSION:S/^python//} instead" .endif +.if defined(PYTHON_VERSION) +WARNING+= "PYTHON_VERSION is defined, consider using DEFAULT_VERSIONS=python=${PYTHON_VERSION:S/^python//} instead" +.endif .if exists(${LOCALBASE}/bin/python) .if !defined(_PYTHON_DEFAULT_VERSION) @@ -281,7 +277,7 @@ _PYTHON_DEFAULT_VERSION!= (${LOCALBASE}/bin/python -c \ .endif _EXPORTED_VARS+= _PYTHON_DEFAULT_VERSION .if defined(PYTHON_DEFAULT) && (${PYTHON_DEFAULT} != ${_PYTHON_DEFAULT_VERSION}) -WARNING+= "Your requested default python version ${PYTHON_DEFAULT} is different from the installed default python interpreter version ${_PYTHON_DEFAULT_VERSION}" +PYTHON_VERSION= python${PYTHON_DEFAULT} .endif PYTHON_DEFAULT_VERSION= python${_PYTHON_DEFAULT_VERSION} .else