Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/python.mk
Show First 20 Lines • Show All 453 Lines • ▼ Show 20 Lines | |||||
# - From PYTHON_DEFAULT | # - From PYTHON_DEFAULT | ||||
PY_FLAVOR= py${_PYTHON_VERSION:S/.//} | PY_FLAVOR= py${_PYTHON_VERSION:S/.//} | ||||
# Pass PYTHON_VERSION down the dependency chain. This ensures that | # Pass PYTHON_VERSION down the dependency chain. This ensures that | ||||
# port A -> B -> C all will use the same python version and do not | # port A -> B -> C all will use the same python version and do not | ||||
# try to find a different one, if the passed version fits into | # try to find a different one, if the passed version fits into | ||||
# the supported version range. | # the supported version range. | ||||
PYTHON_VERSION?= python${_PYTHON_VERSION} | PYTHON_VERSION?= python${_PYTHON_VERSION} | ||||
.if !defined(PYTHON_NO_DEPENDS) && \ | |||||
${PYTHON_VERSION} != python${PYTHON_DEFAULT} | |||||
DEPENDS_ARGS+= PYTHON_VERSION=${PYTHON_VERSION} | |||||
.endif | |||||
# NOTE: | # NOTE: | ||||
# | # | ||||
# PYTHON_VERSION will hold whatever is passed down the dependency chain. | # PYTHON_VERSION will hold whatever is passed down the dependency chain. | ||||
# If a user runs `make PYTHON_VERSION=python3.5, PYTHON_VERSION will be | # If a user runs `make PYTHON_VERSION=python3.5, PYTHON_VERSION will be | ||||
# set to 'python3.5'. A port however may require a different version, | # set to 'python3.5'. A port however may require a different version, | ||||
# which is stored (above) in _PYTHON_VERSION. | # which is stored (above) in _PYTHON_VERSION. | ||||
# Every python bit below hence should use python${_PYTHON_VERSION}, since | # Every python bit below hence should use python${_PYTHON_VERSION}, since | ||||
▲ Show 20 Lines • Show All 288 Lines • Show Last 20 Lines |