Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/python.mk
Show First 20 Lines • Show All 240 Lines • ▼ Show 20 Lines | |||||
# 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 | ||||
# Mk/bsd.default-versions.mk in sync. | # Mk/bsd.default-versions.mk in sync. | ||||
_PYTHON_VERSIONS= 2.7 3.6 3.7 3.5 # preferred first | _PYTHON_VERSIONS= 2.7 3.6 3.7 3.5 # 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 | ||||
# List all valid USE_PYTHON features here | |||||
_VALID_PYTHON_FEATURES= allflavors autoplist concurrent cython cython_run \ | |||||
distutils flavors noegginfo noflavors optsuffix \ | |||||
py3kplist pythonprefix | |||||
_INVALID_PYTHON_FEATURES= | |||||
.for var in ${USE_PYTHON} | |||||
. if empty(_VALID_PYTHON_FEATURES:M${var}) | |||||
_INVALID_PYTHON_FEATURES+= ${var} | |||||
. endif | |||||
.endfor | |||||
sunpoet: I would suggest merging _PYTHON_FEATURE_<FEATURENAME> setting (line 263-266) as follows:
```
. | |||||
Not Done Inline ActionsWhy? What is wrong with looping twice? tobik: Why? What is wrong with looping twice? | |||||
Not Done Inline ActionsI'm not saying it's wrong. It's just a suggestion. sunpoet: I'm not saying it's wrong. It's just a suggestion. | |||||
.if !empty(_INVALID_PYTHON_FEATURES) | |||||
IGNORE+= uses unknown USE_PYTHON features: ${_INVALID_PYTHON_FEATURES} | |||||
.endif | |||||
# Make each individual feature available as _PYTHON_FEATURE_<FEATURENAME> | # Make each individual feature available as _PYTHON_FEATURE_<FEATURENAME> | ||||
.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) | ||||
▲ Show 20 Lines • Show All 470 Lines • Show Last 20 Lines |
I would suggest merging _PYTHON_FEATURE_<FEATURENAME> setting (line 263-266) as follows: