Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/python.mk
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Lines | |||||
# distutils, and support *both* Python 2.x and 3.x. | # distutils, and support *both* Python 2.x and 3.x. | ||||
# Not needed, if USE_PYTHON=autoplist is set. | # Not needed, if USE_PYTHON=autoplist is set. | ||||
# | # | ||||
# pythonprefix - Says that the port installs in ${PYTHONBASE} instead | # pythonprefix - Says that the port installs in ${PYTHONBASE} instead | ||||
# of ${PREFIX}. | # of ${PREFIX}. | ||||
# | # | ||||
# noegginfo - Skip an egg-info entry from plist, if defined. | # noegginfo - Skip an egg-info entry from plist, if defined. | ||||
# | # | ||||
# django - Add a dependency on Django, and a second level of | |||||
# flavoring so that we now have a combination | |||||
# python+django flavor. This variable takes a | |||||
# variety of additional sub-options. | |||||
# Combinations of these can be supplied as a | |||||
# comma-separated list: | |||||
# | |||||
# django=1.11 - Only use the specified version of Django | |||||
# django=2.2+ - Use at least the specified version of Django | |||||
# django=1.11-2.2 - Use a version from the indicated range | |||||
# django=-3.0 - Use at most the specified version of Django | |||||
# django=build - Add django as a build dependency | |||||
# django=run - Add django as a run-time dependency | |||||
# django=test - Add django as a test dependency | |||||
# | |||||
# If none of build, run or test are set | |||||
# explicitly, the default behaviour is | |||||
# equivalent to django=run. | |||||
# | |||||
# Not all combinations of Django and Python | |||||
# versions are permitted. Django 1.11 is | |||||
# compatible with all of the Python versions | |||||
# in the ports, but Django 2.0+ requires | |||||
# Python 3.5+ | |||||
# | |||||
# PYTHON_CMD - Python's command line file name, including the | # PYTHON_CMD - Python's command line file name, including the | ||||
# version number (used for dependencies). | # version number (used for dependencies). | ||||
# default: ${PYTHONBASE}/bin/${PYTHON_VERSION} | # default: ${PYTHONBASE}/bin/${PYTHON_VERSION} | ||||
# | # | ||||
# PYSETUP - Name of the setup script used by the distutils | # PYSETUP - Name of the setup script used by the distutils | ||||
# package. | # package. | ||||
# default: setup.py | # default: setup.py | ||||
# | # | ||||
▲ Show 20 Lines • Show All 105 Lines • ▼ Show 20 Lines | |||||
# and PYTHON2 and PYTHON3 will be set according to the Python version: | # and PYTHON2 and PYTHON3 will be set according to the Python version: | ||||
# | # | ||||
# PYTHON2="" PYTHON3="@comment " for Python 2.x | # PYTHON2="" PYTHON3="@comment " for Python 2.x | ||||
# PYTHON2="@comment " PYTHON3="" for Python 3.x | # PYTHON2="@comment " PYTHON3="" for Python 3.x | ||||
# | # | ||||
# PYDISTUTILS_INSTALLNOSINGLE | # PYDISTUTILS_INSTALLNOSINGLE | ||||
# - Deprecated without replacement | # - Deprecated without replacement | ||||
# | # | ||||
# Adding django to the USE_PYTHON settings causes the following | |||||
# additional variables to be defined: | |||||
# | |||||
# DJANGO_PKGNAMEPREFIX | |||||
# - Use instead of PYTHON_PKGNAMEPREFIX for Django | |||||
# packages. | |||||
# default py${PYTHON_SUFFIX}-django${DJANGO_SUFFIX}- | |||||
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:
```
#… | |||||
# | |||||
# DJANGO_FLAVOR - Use to tag Django ports in | |||||
# {BUILD,RUN,TEST}_DEPENDS lines for flavor | |||||
# support. This is a combination of PY_FLAVOR | |||||
# with the addition of the Django version eg | |||||
# py36-django21 | |||||
# | |||||
# DJANGO_MAJOR_VER - The major release version of the chosen Django | |||||
# framework. e.g. 1, 2 | |||||
# | |||||
# DJANGO_VERSION - The major-minor release version of the chosen | |||||
# Django framework. e.g. django1.11, django2.2, | |||||
# django3.0 | |||||
# | |||||
# DJANGO_PORTVERSION - Version number suitable for ${PORTVERSION} | |||||
# Imported from ${DJANGO_PORTSDIR}/Makefile.version | |||||
# | |||||
# DJANGO_SUFFIX - The major-minor release version of the chosen | |||||
# Django framework without dots. e.g. 111, 22, 30 | |||||
# | |||||
# DJANGO_PORTSDIR - The port directory of the chosen Django framework | |||||
# | |||||
# 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 | ||||
# Mk/bsd.default-versions.mk in sync. | # Mk/bsd.default-versions.mk in sync. | ||||
_PYTHON_VERSIONS= 2.7 3.7 3.8 3.6 3.5 # preferred first | _PYTHON_VERSIONS= 2.7 3.7 3.8 3.6 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 | # List all valid USE_PYTHON features here | ||||
_VALID_PYTHON_FEATURES= allflavors autoplist concurrent cython cython_run \ | _VALID_PYTHON_FEATURES= allflavors autoplist concurrent cython cython_run \ | ||||
distutils flavors noegginfo noflavors optsuffix \ | distutils django flavors noegginfo noflavors optsuffix \ | ||||
py3kplist pythonprefix | py3kplist pythonprefix | ||||
_INVALID_PYTHON_FEATURES= | _INVALID_PYTHON_FEATURES= | ||||
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} | ||||
. if empty(_VALID_PYTHON_FEATURES:M${var}) | . if empty(_VALID_PYTHON_FEATURES:M${var}) | ||||
_INVALID_PYTHON_FEATURES+= ${var} | _INVALID_PYTHON_FEATURES+= ${var} | ||||
. endif | . endif | ||||
.endfor | .endfor | ||||
.if !empty(_INVALID_PYTHON_FEATURES) | .if !empty(_INVALID_PYTHON_FEATURES) | ||||
IGNORE= uses unknown USE_PYTHON features: ${_INVALID_PYTHON_FEATURES} | IGNORE= uses unknown USE_PYTHON features: ${_INVALID_PYTHON_FEATURES} | ||||
.endif | .endif | ||||
▲ Show 20 Lines • Show All 120 Lines • ▼ Show 20 Lines | |||||
. 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/} | ||||
. else | . else | ||||
_ALL_PYTHON_FLAVORS= ${_PYTHON_VERSIONS:S/.//:S/^/py/} | _ALL_PYTHON_FLAVORS= ${_PYTHON_VERSIONS:S/.//:S/^/py/} | ||||
. endif | . endif | ||||
# Decide how many flavors we want. By default, only generate the default | # Decide how many flavors we want. By default, only generate the default | ||||
# versions. | # versions. | ||||
. if defined(BUILD_ALL_PYTHON_FLAVORS) || defined(_PYTHON_FEATURE_ALLFLAVORS) | . if defined(BUILD_ALL_PYTHON_FLAVORS) || defined(_PYTHON_FEATURE_ALLFLAVORS) | ||||
FLAVORS= ${_ALL_PYTHON_FLAVORS} | FLAVORS:= ${_ALL_PYTHON_FLAVORS} | ||||
. else | . else | ||||
. for _v in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} | . for _v in ${PYTHON_DEFAULT} ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} | ||||
_f= py${_v:S/.//} | _f= py${_v:S/.//} | ||||
. if ${_ALL_PYTHON_FLAVORS:M${_f}} && !${FLAVORS:M${_f}} | . if ${_ALL_PYTHON_FLAVORS:M${_f}} && !${FLAVORS:M${_f}} | ||||
.if !empty(FLAVORS) | .if !empty(FLAVORS) | ||||
FLAVORS:= ${FLAVORS} ${_f} | FLAVORS:= ${FLAVORS} ${_f} | ||||
.else | .else | ||||
FLAVORS:= ${_f} | FLAVORS:= ${_f} | ||||
.endif | .endif | ||||
. 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]} | ||||
_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 | ||||
# To avoid having dependencies with @ and empty flavor: | # To avoid having dependencies with @ and empty flavor: | ||||
# _PYTHON_VERSION is either set by (first that matches): | # _PYTHON_VERSION is either set by (first that matches): | ||||
# - If using Python flavors, from the current Python flavor | # - If using Python flavors, from the current Python flavor | ||||
# - If using a version restriction (USES=python:3.5+), from the first | # - If using a version restriction (USES=python:3.5+), from the first | ||||
# acceptable default Python version. | # acceptable default Python version. | ||||
# - From PYTHON_DEFAULT | # - From PYTHON_DEFAULT | ||||
PY_FLAVOR= py${_PYTHON_VERSION:S/.//} | PY_FLAVOR:= py${_PYTHON_VERSION:S/.//} | ||||
PYTHON_VERSION= python${_PYTHON_VERSION} | PYTHON_VERSION= python${_PYTHON_VERSION} | ||||
# 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 | ||||
▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
# PEP 0488 (https://www.python.org/dev/peps/pep-0488/) | # PEP 0488 (https://www.python.org/dev/peps/pep-0488/) | ||||
.if ${PYTHON_REL} < 3500 | .if ${PYTHON_REL} < 3500 | ||||
PYTHON_PYOEXTENSION= pyo | PYTHON_PYOEXTENSION= pyo | ||||
.else | .else | ||||
PYTHON_PYOEXTENSION= opt-1.pyc | PYTHON_PYOEXTENSION= opt-1.pyc | ||||
.endif | .endif | ||||
.if defined(_PYTHON_FEATURE_DJANGO) | |||||
# What Django versions are currently supported? Please keep in sync | |||||
# with the comment in Mk/bsd.default-versions.mk. These are in | |||||
# preference order | |||||
_DJANGO_VERSIONS= 1.11 2.2 3.0 | |||||
_DJANGO_PORTBRANCH= 1.11 # ${_DJANGO_VERSIONS:[1]} | |||||
_DJANGO_RELPORTDIR= www/py-django | |||||
# Dependencies -- unless specific dependencies are requested, default | |||||
# to adding a RUN_DEPENDS on the selected Django port with the | |||||
# selected Python flavor. | |||||
.undef _DJANGO_BUILD_DEP | |||||
.if ${_PYTHON_FEATURE_DJANGO:Mbuild} | |||||
_DJANGO_BUILD_DEP= yes | |||||
_PYTHON_FEATURE_DJANGO:= ${_PYTHON_FEATURE_DJANGO:Nbuild} | |||||
.endif | |||||
.undef _DJANGO_RUN_DEP | |||||
.if ${_PYTHON_FEATURE_DJANGO:Mrun} | |||||
_DJANGO_RUN_DEP= yes | |||||
_PYTHON_FEATURE_DJANGO:= ${_PYTHON_FEATURE_DJANGO:Nrun} | |||||
.endif | |||||
.undef _DJANGO_TEST_DEP | |||||
.if ${_PYTHON_FEATURE_DJANGO:Mtest} | |||||
_DJANGO_TEST_DEP= yes | |||||
_PYTHON_FEATURE_DJANGO:= ${_PYTHON_FEATURE_DJANGO:Ntest} | |||||
.endif | |||||
.if !defined(_DJANGO_BUILD_DEP) && !defined(_DJANGO_RUN_DEP) && \ | |||||
!defined(_DJANGO_TEST_DEP) | |||||
_DJANGO_RUN_DEP= yes | |||||
.endif | |||||
# Choose ether the systemwide default -- the first value from | |||||
# _DJANGO_VERSIONS -- or the value set in DEFAULT_VERSIONS | |||||
_DJANGO_DEFAULT:= ${DJANGO_DEFAULT:U${_DJANGO_PORTBRANCH}} | |||||
# DEFAULT_VERSIONS should contain one of the known Django versions | |||||
.if ! ${_DJANGO_VERSIONS:M${_DJANGO_DEFAULT}} | |||||
IGNORE= Invalid django version ${_DJANGO_DEFAULT} should be one of: ${_DJANGO_VERSIONS:O} | |||||
.endif | |||||
.if defined(DJANGO_VERSION) | |||||
_DJANGO_VERSION:= ${DJANGO_VERSION:S/^django//} | |||||
.else | |||||
_DJANGO_VERSION:= ${_DJANGO_DEFAULT} | |||||
.endif # defined(DJANGO_VERSION) | |||||
# Validate Django version whether it meets the version restriction. | |||||
_DJANGO_VERSION_CHECK:= ${_PYTHON_FEATURE_DJANGO:C/^([1-9]\.[0-9]+)$/\1-\1/} | |||||
_DJANGO_VERSION_MINIMUM:= ${_DJANGO_VERSION_CHECK:C/^([1-9]\.[0-9]+)[-+].*$/\1/} | |||||
_DJANGO_VERSION_MAXIMUM:= ${_DJANGO_VERSION_CHECK:C/^[^-]+-([1-9]\.[0-9]+)$/\1/} | |||||
# Remove any version specifiers and the word 'django: there should be | |||||
# nothing remaining in ${_PYTHON_FEATURE_DJANGO} | |||||
_PYTHON_FEATURE_DJANGO:= ${_PYTHON_FEATURE_DJANGO:C/^[1-9]\.[0-9]+\+?//:C/^-[1-9]\.[0-9]+//} | |||||
_PYTHON_FEATURE_DJANGO:= ${_PYTHON_FEATURE_DJANGO:Ndjango} | |||||
.if !empty(_PYTHON_FEATURE_DJANGO) | |||||
IGNORE= uses unknown USE_PYTHON=django arguments: ${_PYTHON_FEATURE_DJANGO} | |||||
.endif | |||||
DJANGO_VERSION= django${_DJANGO_VERSION} | |||||
DJANGO_MAJOR_VER= ${_DJANGO_VERSION:R} | |||||
DJANGO_SUFFIX= ${_DJANGO_VERSION:S/.//} | |||||
DJANGO_PKGNAMEPREFIX= py${PYTHON_SUFFIX}-django${DJANGO_SUFFIX}- | |||||
DJANGO_PORTSDIR= ${_DJANGO_RELPORTDIR}${DJANGO_SUFFIX} | |||||
# Protect partial checkouts from Mk/Scripts/functions.sh:export_ports_env(). | |||||
.if !defined(_PORTS_ENV_CHECK) || exists(${PORTSDIR}/${DJANGO_PORTSDIR}) | |||||
.include "${PORTSDIR}/${DJANGO_PORTSDIR}/Makefile.version" | |||||
.endif | |||||
# Create a 3 digit integer version string in seven easy steps: | |||||
# 1: Double up the field separator '.' to '..' This makes step 6 easy | |||||
# 2: Delete any non-numeric suffix (rc1, alpha4, etc.) | |||||
# 3: Use only the first two fields | |||||
# 4: Add a '.' at the end -- 2nd and subseq. fields are now bounded by '.' | |||||
# 5: Append .00. if the third field is absent | |||||
# 6: Zero fill any 1 digit fields after the first | |||||
# 7: Delete all the '.' characters | |||||
# | |||||
# 1.11.20 2.0.13 2.1.8 2 2.2 1.2.3.4 2.2r1 2.3.0.b4 | |||||
# _1 1..11..20 2..0..13 2..1..8 2 2..2 1..2..3..4 2..2r1 2..3..0..b4 | |||||
# _2 1..11..20 2..0..13 2..1..8 2 2..2 1..2..3..4 2..2 2..3..0.. | |||||
# _3 1..11 2..0 2..1 2 2..2 1..2 2..2 2..3 | |||||
# _4 1..11. 2..0. 2..1. 2. 2..2. 1..2. 2..2. 2..3. | |||||
# _5 1..11. 2..0. 2..1. 2..00. 2..2. 1..2. 2..2. 2..3. | |||||
# _6 1..11. 2..00. 2..01. 2..00. 2..02. 1..02. 2..02. 2..03. | |||||
# _7 111 200 201 200 202 102 202 203 | |||||
_1= C/\./../g | |||||
_2= C/[^0-9\.].*$$// | |||||
_3= C/^([0-9]+\.\.[0-9]+).*$$/\1/ | |||||
_4= C/$$/./ | |||||
_5= C/^([0-9]+\.)$$/\1.00./ | |||||
_6= C/\.([0-9])\./.0\1./g | |||||
_7= S/.//g | |||||
DJANGO_REL:= ${DJANGO_PORTVERSION:${_1}:${_2}:${_3}:${_4}:${_5}:${_6}:${_7}} | |||||
_DJANGO_MIN:= ${_DJANGO_VERSION_MINIMUM:${_1}:${_2}:${_3}:${_4}:${_5}:${_6}:${_7}} | |||||
_DJANGO_MAX:= ${_DJANGO_VERSION_MAXIMUM:${_1}:${_2}:${_3}:${_4}:${_5}:${_6}:${_7}} | |||||
.undef _DJANGO_VERSION_NONSUPPORTED | |||||
.if !empty(_DJANGO_MIN) && (${DJANGO_REL} < ${_DJANGO_MIN}) | |||||
_DJANGO_VERSION_NONSUPPORTED= ${_DJANGO_VERSION_MINIMUM} at least | |||||
.elif !empty(_DJANGO_MAX) && (${DJANGO_REL} >= ${_DJANGO_MAX}) | |||||
_DJANGO_VERSION_NONSUPPORTED= ${_DJANGO_VERSION_MAXIMUM} at most | |||||
.endif | |||||
.if defined(_DJANGO_VERSION_NONSUPPORTED) | |||||
. if defined(DJANGO_VERSION) | |||||
_DV:= ${_DJANGO_VERSION} | |||||
IGNORE= needs Django ${_DJANGO_VERSION_NONSUPPORTED}, but ${_DV} was specified | |||||
. endif # defined(DJANGO_VERSION) | |||||
. undef _DJANGO_VERSION | |||||
. for ver in ${DJANGO_DEFAULT} ${_DJANGO_VERSIONS} | |||||
__VER= ${ver:${_1}:${_2}:${_3}:${_4}:${_5}:${_6}:${_7}} | |||||
. if !defined(_DJANGO_VERSION) && \ | |||||
${__VER} >= ${_DJANGO_MIN} && \ | |||||
${__VER} <= ${_DJANGO_MAX} | |||||
_DJANGO_VERSION= ${ver} | |||||
. endif | |||||
. endfor | |||||
. if !defined(_DJANGO_VERSION) | |||||
IGNORE= needs an unsupported version of Django | |||||
. endif | |||||
.endif # defined(_DJANGO_VERSION_NONSUPPORTED) | |||||
# ---------------------------------- | |||||
# FLAVORS: A combination if the Django and Python versions, with | |||||
# certain restrictions. | |||||
_PY_FLAVORS:= ${FLAVORS} | |||||
.undef FLAVORS | |||||
# We have _PYTHON_VERSION as the chosen python version and | |||||
# _DJANGO_VERSION as the chosen django version, from which we should | |||||
# be able to derive the particular DJANGO_FLAVOR we want to build. | |||||
# Except that we need to ensure compatible versions of python and | |||||
# django -- django-2.2+ requires python-3.5+ while django-1.11 will | |||||
# work with all python 2.7+ | |||||
DJANGO_FLAVOR= py${_PYTHON_VERSION:S/.//}-django${_DJANGO_VERSION:S/.//} | |||||
.for _djv in ${_DJANGO_VERSIONS:S/.//} | |||||
. for _pyv in ${_PYTHON_VERSIONS:S/.//} | |||||
. if ( ${_pyv} != 27 || ${_djv} == 111 ) | |||||
_f:= py${_pyv}-django${_djv} | |||||
FLAVORS:= ${FLAVORS} ${_f} | |||||
. endif | |||||
. endfor | |||||
.endfor | |||||
.if empty(FLAVOR) | |||||
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… | |||||
FLAVOR:= ${FLAVORS:[1]} | |||||
.endif | |||||
.for _stage in BUILD RUN TEST | |||||
. if defined(_DJANGO_${_stage}_DEP) | |||||
${_stage}_DEPENDS+= py${PYTHON_SUFFIX}-django${DJANGO_SUFFIX}>0:${DJANGO_PORTSDIR}@${PY_FLAVOR} | |||||
. endif | |||||
.endfor | |||||
.endif # defined(_PYTHON_FEATURE_DJANGO) | |||||
# Ports bound to a certain python version SHOULD | # Ports bound to a certain python version SHOULD | ||||
# - use the PYTHON_PKGNAMEPREFIX | # - use the PYTHON_PKGNAMEPREFIX | ||||
# - use directories using the PYTHON_PKGNAMEPREFIX | # - use directories using the PYTHON_PKGNAMEPREFIX | ||||
# - install binaries using the required PYTHON_VER, with | # - install binaries using the required PYTHON_VER, with | ||||
# the default python version creating a symlink to the original binary | # the default python version creating a symlink to the original binary | ||||
# name (for staging-aware ports). | # name (for staging-aware ports). | ||||
# | # | ||||
# What makes a port 'bound' to a certain python version? | # What makes a port 'bound' to a certain python version? | ||||
▲ Show 20 Lines • Show All 214 Lines • ▼ Show 20 Lines | do-build: | ||||
@(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) | @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_BUILD_TARGET} ${PYDISTUTILS_BUILDARGS}) | ||||
.endif | .endif | ||||
.if !target(do-install) | .if !target(do-install) | ||||
do-install: | do-install: | ||||
@(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) | @(cd ${INSTALL_WRKSRC}; ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} ${PYDISTUTILS_INSTALL_TARGET} ${PYDISTUTILS_INSTALLARGS}) | ||||
.endif | .endif | ||||
.endif # defined(_PYTHON_FEATURE_DISTUTILS) | .endif # defined(_PYTHON_FEATURE_DISTUTILS) | ||||
.endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PYTHON_POST_MK) | .endif # defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_PYTHON_POST_MK) |
This says SUFFIX, should be PREFIX.