Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/python.mk
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | |||||
# - Deprecated without replacement | # - Deprecated without replacement | ||||
# | # | ||||
# MAINTAINER: python@FreeBSD.org | # MAINTAINER: python@FreeBSD.org | ||||
.if !defined(_INCLUDE_USES_PYTHON_MK) | .if !defined(_INCLUDE_USES_PYTHON_MK) | ||||
_INCLUDE_USES_PYTHON_MK= yes | _INCLUDE_USES_PYTHON_MK= yes | ||||
# What Python version and what Python interpreters are currently supported? | # What Python version and what Python interpreters are currently supported? | ||||
# When adding a version, please keep the comment in | # When adding a version, please keep the comment in | ||||
mat: This says SUFFIX, should be PREFIX. | |||||
Done Inline ActionsThis simply parallels the comment on PYTHON_PKGNAMEPREFIX at lines 242-245: # PYTHON_PKGNAMEPREFIX # - Use this as a ${PKGNAMEPREFIX} to distinguish # packages for different Python versions. # default: py${PYTHON_SUFFIX}- ${PYTHON_SUFFIX} is maybe a badly named variable, but changing it would be a lot of churn. matthew: This simply parallels the comment on PYTHON_PKGNAMEPREFIX at lines 242-245:
```
#… | |||||
# Mk/bsd.default-versions.mk in sync. | # Mk/bsd.default-versions.mk in sync. | ||||
_PYTHON_VERSIONS= 2.7 3.6 3.5 3.4 # preferred first | _PYTHON_VERSIONS= 2.7 3.6 3.5 3.4 # preferred first | ||||
_PYTHON_PORTBRANCH= 2.7 # ${_PYTHON_VERSIONS:[1]} | _PYTHON_PORTBRANCH= 2.7 # ${_PYTHON_VERSIONS:[1]} | ||||
_PYTHON_BASECMD= ${LOCALBASE}/bin/python | _PYTHON_BASECMD= ${LOCALBASE}/bin/python | ||||
_PYTHON_RELPORTDIR= lang/python | _PYTHON_RELPORTDIR= lang/python | ||||
# Make each individual feature available as _PYTHON_FEATURE_<FEATURENAME> | # Make each individual feature available as _PYTHON_FEATURE_<FEATURENAME> | ||||
Done Inline ActionsCan you try to only change what you need, adding whitespace and rewrapping differently is not great. mat: Can you try to only change what you need, adding whitespace and rewrapping differently is not… | |||||
.for var in ${USE_PYTHON} | .for var in ${USE_PYTHON} | ||||
_PYTHON_FEATURE_${var:C/=.*$//:tu}= ${var:C/.*=//:S/,/ /g} | _PYTHON_FEATURE_${var:C/=.*$//:tu}= ${var:C/.*=//:S/,/ /g} | ||||
.endfor | .endfor | ||||
# distutils automatically generates flavors depending on the supported | # distutils automatically generates flavors depending on the supported | ||||
# versions. | # versions. | ||||
.if defined(_PYTHON_FEATURE_DISTUTILS) | .if defined(_PYTHON_FEATURE_DISTUTILS) | ||||
_PYTHON_FEATURE_FLAVORS= yes | _PYTHON_FEATURE_FLAVORS= yes | ||||
▲ Show 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | |||||
. 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]} | ||||
_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 | ||||
.endif | .endif | ||||
▲ Show 20 Lines • Show All 231 Lines • ▼ Show 20 Lines | |||||
PY_PATHLIB= | PY_PATHLIB= | ||||
.endif | .endif | ||||
.if ${PYTHON_REL} < 3300 | .if ${PYTHON_REL} < 3300 | ||||
PY_IPADDRESS= ${PYTHON_PKGNAMEPREFIX}ipaddress>0:net/py-ipaddress@${PY_FLAVOR} | PY_IPADDRESS= ${PYTHON_PKGNAMEPREFIX}ipaddress>0:net/py-ipaddress@${PY_FLAVOR} | ||||
.else | .else | ||||
PY_IPADDRESS= | PY_IPADDRESS= | ||||
.endif | .endif | ||||
Done Inline ActionsBy definition, the default flavor is the first of the flavors. . if empty(FLAVOR) FLAVOR:= ${FLAVORS:[1]} . endif mat: By definition, the default flavor is the first of the flavors.
```
. if empty(FLAVOR)
FLAVOR… | |||||
.if ${PYTHON_REL} < 3200 | .if ${PYTHON_REL} < 3200 | ||||
PY_FUTURES= ${PYTHON_PKGNAMEPREFIX}futures>0:devel/py-futures@${PY_FLAVOR} | PY_FUTURES= ${PYTHON_PKGNAMEPREFIX}futures>0:devel/py-futures@${PY_FLAVOR} | ||||
.else | .else | ||||
PY_FUTURES= | PY_FUTURES= | ||||
.endif | .endif | ||||
# dependencies | # dependencies | ||||
.if defined(_PYTHON_BUILD_DEP) | .if defined(_PYTHON_BUILD_DEP) | ||||
▲ Show 20 Lines • Show All 71 Lines • Show Last 20 Lines |
This says SUFFIX, should be PREFIX.