Changeset View
Changeset View
Standalone View
Standalone View
head/Mk/Uses/python.mk
Show First 20 Lines • Show All 377 Lines • ▼ Show 20 Lines | |||||
# Got the correct python version, set some publicly accessible variables | # Got the correct python version, set some publicly accessible variables | ||||
PYTHON_VER= ${_PYTHON_VERSION} | PYTHON_VER= ${_PYTHON_VERSION} | ||||
PYTHON_SUFFIX= ${_PYTHON_VERSION:S/.//g} | PYTHON_SUFFIX= ${_PYTHON_VERSION:S/.//g} | ||||
PYTHON_MAJOR_VER= ${PYTHON_VER:R} | PYTHON_MAJOR_VER= ${PYTHON_VER:R} | ||||
PYTHON_REL= # empty | PYTHON_REL= # empty | ||||
PYTHON_ABIVER= # empty | PYTHON_ABIVER= # empty | ||||
PYTHON_PORTSDIR= ${_PYTHON_RELPORTDIR}${PYTHON_SUFFIX} | PYTHON_PORTSDIR= ${_PYTHON_RELPORTDIR}${PYTHON_SUFFIX} | ||||
PYTHON_PORTVERSION!= ${MAKE} -V PORTVERSION -C ${PYTHON_PORTSDIR} | PYTHON_PORTVERSION!= ${MAKE} -V PORTVERSION -C ${PYTHON_PORTSDIR} | ||||
PYTHON_REL= ${PYTHON_PORTVERSION:C/\.([0-9]+)$/.0\1/:C/\.0?([0-9][0-9])$/.\1/:S/.//g} | # Create a 4 integer version string, prefixing 0 to the last token if | ||||
# it's a single character. Only use the the first 3 tokens of | |||||
# PORTVERSION to support pre-release versions (rc3, alpha4, etc) of | |||||
# any Python port (lang/pythonXY) | |||||
PYTHON_REL= ${PYTHON_PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/:C/\.([0-9]+)$/.0\1/:C/\.0?([0-9][0-9])$/.\1/:S/.//g} | |||||
# Might be overridden by calling ports | # Might be overridden by calling ports | ||||
PYTHON_CMD?= ${_PYTHON_BASECMD}${_PYTHON_VERSION} | PYTHON_CMD?= ${_PYTHON_BASECMD}${_PYTHON_VERSION} | ||||
.if exists(${PYTHON_CMD}-config) && ${PYTHON_VER} != 2.7 | .if exists(${PYTHON_CMD}-config) && ${PYTHON_VER} != 2.7 | ||||
PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags | PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags | ||||
.endif | .endif | ||||
PYTHONBASE!= (${PYTHON_CMD} -c 'import sys; print(sys.prefix)' \ | PYTHONBASE!= (${PYTHON_CMD} -c 'import sys; print(sys.prefix)' \ | ||||
▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines |