Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/python.mk
Show First 20 Lines • Show All 168 Lines • ▼ Show 20 Lines | |||||
# interpreter, e.g. /usr/local | # interpreter, e.g. /usr/local | ||||
# | # | ||||
# PYTHON_PORTVERSION | # PYTHON_PORTVERSION | ||||
# - Version number suitable for ${PORTVERSION}. | # - Version number suitable for ${PORTVERSION}. | ||||
# | # | ||||
# PYTHON_PORTSDIR - The port directory of the chosen Python interpreter | # PYTHON_PORTSDIR - The port directory of the chosen Python interpreter | ||||
# | # | ||||
# PYTHON_REL - The release number of the chosen Python interpreter | # PYTHON_REL - The release number of the chosen Python interpreter | ||||
# without dots, e.g. 2706, 3401, ... | # without dots, e.g. 20706, 30401, ... | ||||
# | # | ||||
# PYTHON_SUFFIX - The major-minor release number of the chosen Python | # PYTHON_SUFFIX - The major-minor release number of the chosen Python | ||||
# interpreter without dots, e.g. 27, 36, ... | # interpreter without dots, e.g. 27, 36, ... | ||||
# Used for prefixes and suffixes. | # Used for prefixes and suffixes. | ||||
# | # | ||||
# PYTHON_MAJOR_VER - The major release version of the chosen Python | # PYTHON_MAJOR_VER - The major release version of the chosen Python | ||||
# interpreter, e.g. 2, 3, ... | # interpreter, e.g. 2, 3, ... | ||||
# | # | ||||
▲ Show 20 Lines • Show All 146 Lines • ▼ Show 20 Lines | |||||
_PYTHON_VERSION:= ${PYTHON_DEFAULT} | _PYTHON_VERSION:= ${PYTHON_DEFAULT} | ||||
.if empty(_PYTHON_ARGS) | .if empty(_PYTHON_ARGS) | ||||
_PYTHON_ARGS= 3.6+ | _PYTHON_ARGS= 3.6+ | ||||
.endif | .endif | ||||
# Validate Python version whether it meets the version restriction. | # Validate Python version whether it meets the version restriction. | ||||
_PYTHON_VERSION_CHECK:= ${_PYTHON_ARGS:C/^([1-9]\.[0-9])$/\1-\1/} | _PYTHON_VERSION_CHECK:= ${_PYTHON_ARGS:C/^([1-9]\.[1-9]?[0-9])$/\1-\1/} | ||||
_PYTHON_VERSION_MINIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/([1-9]\.[0-9])[-+].*/\1/} | _PYTHON_VERSION_MINIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/([1-9]\.[1-9]?[0-9])[-+].*/\1/} | ||||
_PYTHON_VERSION_MINIMUM:= ${_PYTHON_VERSION_MINIMUM_TMP:M[1-9].[0-9]} | _PYTHON_VERSION_MINIMUM:= ${_PYTHON_VERSION_MINIMUM_TMP:M[1-9].[0-9]}${_PYTHON_VERSION_MINIMUM_TMP:M[1-9].[1-9][0-9]} | ||||
_PYTHON_VERSION_MAXIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/.*-([1-9]\.[0-9])/\1/} | _PYTHON_VERSION_MAXIMUM_TMP:= ${_PYTHON_VERSION_CHECK:C/.*-([1-9]\.[1-9]?[0-9])/\1/} | ||||
_PYTHON_VERSION_MAXIMUM:= ${_PYTHON_VERSION_MAXIMUM_TMP:M[1-9].[0-9]} | _PYTHON_VERSION_MAXIMUM:= ${_PYTHON_VERSION_MAXIMUM_TMP:M[1-9].[0-9]}${_PYTHON_VERSION_MAXIMUM_TMP:M[1-9].[1-9][0-9]} | ||||
# At this point we should have no argument left in ${_PYTHON_ARGS} | # At this point we should have no argument left in ${_PYTHON_ARGS} | ||||
# except a version spec | # except a version spec | ||||
_PYTHON_ARGS:= ${_PYTHON_ARGS:N[1-9].[0-9]-[1-9].[0-9]:N[1-9].[0-9]:N[1-9].[0-9]+:N-[1-9].[0-9]} | _V1= [1-9].[0-9] | ||||
_V2= [1-9].[1-9][0-9] | |||||
_PYTHON_ARGS:= ${_PYTHON_ARGS:N${_V1}-${_V1}:N${_V1}-${_V2}:N${_V2}-${_V2}:N${_V1}:N${_V2}:N${_V1}+:N${_V2}+:N-${_V1}:N-${_V2}} | |||||
.if !empty(_PYTHON_ARGS) | .if !empty(_PYTHON_ARGS) | ||||
IGNORE= uses unknown USES=python arguments: ${_PYTHON_ARGS} | IGNORE= uses unknown USES=python arguments: ${_PYTHON_ARGS} | ||||
.endif | .endif | ||||
# Pattern to convert python versions (X.Y or X.YY) to comparable format X.YY | |||||
_VC= C/^([1-9]\.)([0-9])$$/\10\2/ | |||||
.undef _PYTHON_VERSION_NONSUPPORTED | .undef _PYTHON_VERSION_NONSUPPORTED | ||||
.if !empty(_PYTHON_VERSION_MINIMUM) && (${_PYTHON_VERSION} < ${_PYTHON_VERSION_MINIMUM}) | .if !empty(_PYTHON_VERSION_MINIMUM) && (${_PYTHON_VERSION:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}}) | ||||
_PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MINIMUM} at least | _PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MINIMUM} at least | ||||
.elif !empty(_PYTHON_VERSION_MAXIMUM) && (${_PYTHON_VERSION} > ${_PYTHON_VERSION_MAXIMUM}) | .elif !empty(_PYTHON_VERSION_MAXIMUM) && (${_PYTHON_VERSION:${_VC}} > ${_PYTHON_VERSION_MAXIMUM:${_VC}}) | ||||
_PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MAXIMUM} at most | _PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MAXIMUM} at most | ||||
.endif | .endif | ||||
# If we have an unsupported version of Python, try another. | # If we have an unsupported version of Python, try another. | ||||
.if defined(_PYTHON_VERSION_NONSUPPORTED) | .if defined(_PYTHON_VERSION_NONSUPPORTED) | ||||
.undef _PYTHON_VERSION | .undef _PYTHON_VERSION | ||||
.for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} | .for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} | ||||
__VER= ${ver} | __VER= ${ver} | ||||
.if !defined(_PYTHON_VERSION) && \ | .if !defined(_PYTHON_VERSION) && \ | ||||
!(!empty(_PYTHON_VERSION_MINIMUM) && ( \ | !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ | ||||
${__VER} < ${_PYTHON_VERSION_MINIMUM})) && \ | ${__VER:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}})) && \ | ||||
!(!empty(_PYTHON_VERSION_MAXIMUM) && ( \ | !(!empty(_PYTHON_VERSION_MAXIMUM) && ( \ | ||||
${__VER} > ${_PYTHON_VERSION_MAXIMUM})) | ${__VER:${_VC}} > ${_PYTHON_VERSION_MAXIMUM:${_VC}})) | ||||
_PYTHON_VERSION= ${ver} | _PYTHON_VERSION= ${ver} | ||||
.endif | .endif | ||||
.endfor | .endfor | ||||
.if !defined(_PYTHON_VERSION) | .if !defined(_PYTHON_VERSION) | ||||
IGNORE= needs an unsupported version of Python | IGNORE= needs an unsupported version of Python | ||||
.endif | .endif | ||||
.endif # defined(_PYTHON_VERSION_NONSUPPORTED) | .endif # defined(_PYTHON_VERSION_NONSUPPORTED) | ||||
# Automatically generates FLAVORS if empty | # Automatically generates FLAVORS if empty | ||||
.if empty(FLAVORS) && defined(_PYTHON_FEATURE_FLAVORS) | .if empty(FLAVORS) && defined(_PYTHON_FEATURE_FLAVORS) | ||||
. undef _VALID_PYTHON_VERSIONS | . undef _VALID_PYTHON_VERSIONS | ||||
. for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} | . for ver in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} | ||||
__VER= ${ver} | __VER= ${ver} | ||||
. if !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ | . if !(!empty(_PYTHON_VERSION_MINIMUM) && ( \ | ||||
${__VER} < ${_PYTHON_VERSION_MINIMUM})) && \ | ${__VER:${_VC}} < ${_PYTHON_VERSION_MINIMUM:${_VC}})) && \ | ||||
!(!empty(_PYTHON_VERSION_MAXIMUM) && ( \ | !(!empty(_PYTHON_VERSION_MAXIMUM) && ( \ | ||||
${__VER} > ${_PYTHON_VERSION_MAXIMUM})) | ${__VER:${_VC}} > ${_PYTHON_VERSION_MAXIMUM:${_VC}})) | ||||
. if empty(_VALID_PYTHON_VERSIONS:M${ver}) | . if empty(_VALID_PYTHON_VERSIONS:M${ver}) | ||||
_VALID_PYTHON_VERSIONS+= ${ver} | _VALID_PYTHON_VERSIONS+= ${ver} | ||||
. endif | . endif | ||||
. endif | . endif | ||||
. endfor | . endfor | ||||
# Get all possible flavors depending on version requirements | # Get all possible flavors depending on version requirements | ||||
. if defined(_VALID_PYTHON_VERSIONS) | . if defined(_VALID_PYTHON_VERSIONS) | ||||
_ALL_PYTHON_FLAVORS= ${_VALID_PYTHON_VERSIONS:S/.//:S/^/py/} | _ALL_PYTHON_FLAVORS= ${_VALID_PYTHON_VERSIONS:S/.//:S/^/py/} | ||||
Show All 16 Lines | |||||
. endif | . endif | ||||
. endfor | . endfor | ||||
. endif | . endif | ||||
. if !empty(FLAVORS) && empty(FLAVOR) | . if !empty(FLAVORS) && empty(FLAVOR) | ||||
FLAVOR= ${FLAVORS:[1]} | FLAVOR= ${FLAVORS:[1]} | ||||
. endif | . endif | ||||
.endif | .endif | ||||
.if ${FLAVOR:Mpy[23][0-9]} | .if ${FLAVOR:Mpy[23][0-9]}${FLAVOR:Mpy[23][1-9][0-9]} | ||||
_PYTHON_VERSION= ${FLAVOR:S/py//:C/(.)/\1./} | _PYTHON_VERSION= ${FLAVOR:S/py//:C/(.)/\1./} | ||||
.endif | .endif | ||||
.if !empty(FLAVOR) && ${_PYTHON_VERSION} != ${PYTHON_DEFAULT} | .if !empty(FLAVOR) && ${_PYTHON_VERSION} != ${PYTHON_DEFAULT} | ||||
.if defined(_PYTHON_FEATURE_OPTSUFFIX) | .if defined(_PYTHON_FEATURE_OPTSUFFIX) | ||||
DEV_WARNING+= "USE_PYTHON=optsuffix is deprecated, consider migrating to using unconditional PKGNAMESUFFIX or PKGNAMEPREFIX" | DEV_WARNING+= "USE_PYTHON=optsuffix is deprecated, consider migrating to using unconditional PKGNAMESUFFIX or PKGNAMEPREFIX" | ||||
PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX} | PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX} | ||||
.endif | .endif | ||||
Show All 22 Lines | |||||
.else | .else | ||||
PYTHON_EXT_SUFFIX= # empty | PYTHON_EXT_SUFFIX= # empty | ||||
.endif | .endif | ||||
# Protect partial checkouts from Mk/Scripts/functions.sh:export_ports_env(). | # Protect partial checkouts from Mk/Scripts/functions.sh:export_ports_env(). | ||||
.if !defined(_PORTS_ENV_CHECK) || exists(${PORTSDIR}/${PYTHON_PORTSDIR}) | .if !defined(_PORTS_ENV_CHECK) || exists(${PORTSDIR}/${PYTHON_PORTSDIR}) | ||||
.include "${PORTSDIR}/${PYTHON_PORTSDIR}/Makefile.version" | .include "${PORTSDIR}/${PYTHON_PORTSDIR}/Makefile.version" | ||||
.endif | .endif | ||||
# Create a 4 integer version string, prefixing 0 to the last token if | # Create a 5 integer version string, prefixing 0 to the minor and patch | ||||
# it's a single character. Only use the the first 3 tokens of | # tokens if it's a single character. Only use the the first 3 tokens of | ||||
# PORTVERSION to support pre-release versions (rc3, alpha4, etc) of | # PORTVERSION to support pre-release versions (rc3, alpha4, etc) of | ||||
# any Python port (lang/pythonXY) | # 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} | PYTHON_REL= ${PYTHON_PORTVERSION:C/^([0-9]+\.[0-9]+\.[0-9]+).*/\1/:C/\.([0-9])$/.0\1/:C/\.([0-9]\.[0-9]+)/.0\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 ${PYTHON_VER} != 2.7 | .if ${PYTHON_VER} != 2.7 | ||||
.if exists(${PYTHON_CMD}-config) | .if exists(${PYTHON_CMD}-config) | ||||
PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags | PYTHON_ABIVER!= ${PYTHON_CMD}-config --abiflags | ||||
.elif ${PYTHON_REL} < 3800 | .elif ${PYTHON_REL} < 30800 | ||||
# Default ABI flags for lang/python3[67] ports | # Default ABI flags for lang/python3[67] ports | ||||
PYTHON_ABIVER= m | PYTHON_ABIVER= m | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.if ${PYTHON_MAJOR_VER} == 2 | .if ${PYTHON_MAJOR_VER} == 2 | ||||
DEPRECATED?= Uses Python 2.7 which is EOLed upstream | DEPRECATED?= Uses Python 2.7 which is EOLed upstream | ||||
EXPIRATION_DATE?= 2020-12-31 | EXPIRATION_DATE?= 2020-12-31 | ||||
▲ Show 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | @${SED} -e 's|^"\(.*\)"$$|\1|' \ | ||||
-e 's|^${STAGEDIR}${PREFIX}/||' \ | -e 's|^${STAGEDIR}${PREFIX}/||' \ | ||||
-e 's|^${PREFIX}/||' \ | -e 's|^${PREFIX}/||' \ | ||||
-e 's|^\(man/.*man[0-9]\)/\(.*\.[0-9]\)$$|\1/\2.gz|' \ | -e 's|^\(man/.*man[0-9]\)/\(.*\.[0-9]\)$$|\1/\2.gz|' \ | ||||
-e 's|^\(share/man/.*man[0-9]\)/\(.*\.[0-9]\)$$|\1/\2.gz|' \ | -e 's|^\(share/man/.*man[0-9]\)/\(.*\.[0-9]\)$$|\1/\2.gz|' \ | ||||
-e 's|[[:alnum:]|[:space:]]*/\.\./*||g; s|/\./|/|g' \ | -e 's|[[:alnum:]|[:space:]]*/\.\./*||g; s|/\./|/|g' \ | ||||
${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST} | ${_PYTHONPKGLIST} | ${SORT} >> ${TMPPLIST} | ||||
.else | .else | ||||
.if ${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST) | .if ${PYTHON_REL} >= 30200 && defined(_PYTHON_FEATURE_PY3KPLIST) | ||||
# When Python version is 3.2+ we rewrite all the filenames | # When Python version is 3.2+ we rewrite all the filenames | ||||
# of TMPPLIST that end with .py[co], so that they conform | # of TMPPLIST that end with .py[co], so that they conform | ||||
# to PEP 3147 (see https://www.python.org/dev/peps/pep-3147/) | # to PEP 3147 (see https://www.python.org/dev/peps/pep-3147/) | ||||
PYMAGICTAG= ${PYTHON_CMD} -c 'import sys; print(sys.implementation.cache_tag)' | PYMAGICTAG= ${PYTHON_CMD} -c 'import sys; print(sys.implementation.cache_tag)' | ||||
_USES_stage+= 935:add-plist-python | _USES_stage+= 935:add-plist-python | ||||
add-plist-python: | add-plist-python: | ||||
@${AWK} '\ | @${AWK} '\ | ||||
/\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.pyc$$/, "." mt "&"); sub(/\.pyo$$/, "." mt "." pyo); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \ | /\.py[co]$$/ && !($$0 ~ "/" pc "/") {id = match($$0, /\/[^\/]+\.py[co]$$/); if (id != 0) {d = substr($$0, 1, RSTART - 1); dirs[d] = 1}; sub(/\.pyc$$/, "." mt "&"); sub(/\.pyo$$/, "." mt "." pyo); sub(/[^\/]+\.py[co]$$/, pc "/&"); print; next} \ | ||||
/^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ | /^@dirrm / {d = substr($$0, 8); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ | ||||
/^@dirrmtry / {d = substr($$0, 11); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ | /^@dirrmtry / {d = substr($$0, 11); if (d in dirs) {print $$0 "/" pc}; print $$0; next} \ | ||||
{print} \ | {print} \ | ||||
' \ | ' \ | ||||
pc="__pycache__" mt="$$(${PYMAGICTAG})" pyo="opt-1.pyc" \ | pc="__pycache__" mt="$$(${PYMAGICTAG})" pyo="opt-1.pyc" \ | ||||
${TMPPLIST} > ${TMPPLIST}.pyc_tmp | ${TMPPLIST} > ${TMPPLIST}.pyc_tmp | ||||
@${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST} | @${MV} ${TMPPLIST}.pyc_tmp ${TMPPLIST} | ||||
.endif # ${PYTHON_REL} >= 3200 && defined(_PYTHON_FEATURE_PY3KPLIST) | .endif # ${PYTHON_REL} >= 30200 && defined(_PYTHON_FEATURE_PY3KPLIST) | ||||
.endif # defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS) | .endif # defined(_PYTHON_FEATURE_AUTOPLIST) && defined(_PYTHON_FEATURE_DISTUTILS) | ||||
# Fix for programs that build python from a GNU auto* environment | # Fix for programs that build python from a GNU auto* environment | ||||
CONFIGURE_ENV+= PYTHON="${PYTHON_CMD}" | CONFIGURE_ENV+= PYTHON="${PYTHON_CMD}" | ||||
# By default CMake picks up the highest available version of Python package. | # By default CMake picks up the highest available version of Python package. | ||||
# Enforce the version required by the port or the default. | # Enforce the version required by the port or the default. | ||||
CMAKE_ARGS+= -DPython_ADDITIONAL_VERSIONS=${PYTHON_VER} | CMAKE_ARGS+= -DPython_ADDITIONAL_VERSIONS=${PYTHON_VER} | ||||
# Python 3rd-party modules | # Python 3rd-party modules | ||||
PYGAME= ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game@${PY_FLAVOR} | PYGAME= ${PYTHON_PKGNAMEPREFIX}game>0:devel/py-game@${PY_FLAVOR} | ||||
PYNUMPY= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16,1<1.20,1:math/py-numpy@${PY_FLAVOR} | PYNUMPY= ${PYTHON_PKGNAMEPREFIX}numpy>=1.16,1<1.20,1:math/py-numpy@${PY_FLAVOR} | ||||
# Common Python modules that can be needed but only for some versions of Python. | # Common Python modules that can be needed but only for some versions of Python. | ||||
.if ${PYTHON_REL} < 3500 | .if ${PYTHON_REL} < 30500 | ||||
PY_PYGMENTS= ${PYTHON_PKGNAMEPREFIX}pygments-25>=2.5.1<3:textproc/py-pygments-25@${PY_FLAVOR} | PY_PYGMENTS= ${PYTHON_PKGNAMEPREFIX}pygments-25>=2.5.1<3:textproc/py-pygments-25@${PY_FLAVOR} | ||||
.else | .else | ||||
PY_PILLOW= ${PYTHON_PKGNAMEPREFIX}pillow>=7.0.0:graphics/py-pillow@${PY_FLAVOR} | PY_PILLOW= ${PYTHON_PKGNAMEPREFIX}pillow>=7.0.0:graphics/py-pillow@${PY_FLAVOR} | ||||
PY_PYGMENTS= ${PYTHON_PKGNAMEPREFIX}pygments>=2.5.1<3:textproc/py-pygments@${PY_FLAVOR} | PY_PYGMENTS= ${PYTHON_PKGNAMEPREFIX}pygments>=2.5.1<3:textproc/py-pygments@${PY_FLAVOR} | ||||
.endif | .endif | ||||
.if ${PYTHON_REL} < 3400 | .if ${PYTHON_REL} < 30400 | ||||
PY_ENUM34= ${PYTHON_PKGNAMEPREFIX}enum34>=1.1<2.0:devel/py-enum34@${PY_FLAVOR} | PY_ENUM34= ${PYTHON_PKGNAMEPREFIX}enum34>=1.1<2.0:devel/py-enum34@${PY_FLAVOR} | ||||
.else | .else | ||||
PY_ENUM34= | PY_ENUM34= | ||||
.endif | .endif | ||||
.if ${PYTHON_VER} != ${PYTHON_DEFAULT} | .if ${PYTHON_VER} != ${PYTHON_DEFAULT} | ||||
PY_MERCURIAL= ${PYTHON_PKGNAMEPREFIX}mercurial>=5.5:devel/mercurial@${PY_FLAVOR} | PY_MERCURIAL= ${PYTHON_PKGNAMEPREFIX}mercurial>=5.5:devel/mercurial@${PY_FLAVOR} | ||||
.else | .else | ||||
Show All 22 Lines | |||||
PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} \ | PLIST_SUB+= PYTHON_INCLUDEDIR=${PYTHONPREFIX_INCLUDEDIR:S;${PREFIX}/;;} \ | ||||
PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} \ | PYTHON_LIBDIR=${PYTHONPREFIX_LIBDIR:S;${PREFIX}/;;} \ | ||||
PYTHON_PLATFORM=${PYTHON_PLATFORM} \ | PYTHON_PLATFORM=${PYTHON_PLATFORM} \ | ||||
PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} \ | PYTHON_SITELIBDIR=${PYTHONPREFIX_SITELIBDIR:S;${PREFIX}/;;} \ | ||||
PYTHON_SUFFIX=${PYTHON_SUFFIX} \ | PYTHON_SUFFIX=${PYTHON_SUFFIX} \ | ||||
PYTHON_EXT_SUFFIX=${PYTHON_EXT_SUFFIX} \ | PYTHON_EXT_SUFFIX=${PYTHON_EXT_SUFFIX} \ | ||||
PYTHON_VER=${PYTHON_VER} \ | PYTHON_VER=${PYTHON_VER} \ | ||||
PYTHON_VERSION=${PYTHON_VERSION} | PYTHON_VERSION=${PYTHON_VERSION} | ||||
.if ${PYTHON_REL} < 3000 | .if ${PYTHON_REL} < 30000 | ||||
PLIST_SUB+= PYTHON2="" PYTHON3="@comment " | PLIST_SUB+= PYTHON2="" PYTHON3="@comment " | ||||
.else | .else | ||||
PLIST_SUB+= PYTHON2="@comment " PYTHON3="" | PLIST_SUB+= PYTHON2="@comment " PYTHON3="" | ||||
.endif | .endif | ||||
_USES_POST+= python | _USES_POST+= python | ||||
.endif # _INCLUDE_USES_PYTHON_MK | .endif # _INCLUDE_USES_PYTHON_MK | ||||
Show All 28 Lines |