Lines 103-108
Link Here
|
103 |
# distutils - Use distutils as do-configure, do-build and |
103 |
# distutils - Use distutils as do-configure, do-build and |
104 |
# do-install targets. implies flavors. |
104 |
# do-install targets. implies flavors. |
105 |
# |
105 |
# |
|
|
106 |
# build - Use build as do-build and |
107 |
# do-install targets. implies flavors. |
108 |
# |
106 |
# autoplist - Automatically generates the packaging list for a |
109 |
# autoplist - Automatically generates the packaging list for a |
107 |
# port that uses distutils when defined. |
110 |
# port that uses distutils when defined. |
108 |
# requires: distutils |
111 |
# requires: distutils |
Lines 139-144
Link Here
|
139 |
# package. |
142 |
# package. |
140 |
# default: setup.py |
143 |
# default: setup.py |
141 |
# |
144 |
# |
|
|
145 |
# PYBUILD_WHEELNAME - Internal base name of the wheel file that build creates. |
146 |
# default: ${PORTNAME} with '-' replaced with '_' |
147 |
# |
142 |
# PYDISTUTILS_PKGNAME |
148 |
# PYDISTUTILS_PKGNAME |
143 |
# - Internal name in the distutils for egg-info. |
149 |
# - Internal name in the distutils for egg-info. |
144 |
# default: ${PORTNAME} |
150 |
# default: ${PORTNAME} |
Lines 281-287
_PYTHON_BASECMD= ${LOCALBASE}/bin/python
Link Here
|
281 |
_PYTHON_RELPORTDIR= lang/python |
287 |
_PYTHON_RELPORTDIR= lang/python |
282 |
|
288 |
|
283 |
# List all valid USE_PYTHON features here |
289 |
# List all valid USE_PYTHON features here |
284 |
_VALID_PYTHON_FEATURES= allflavors autoplist concurrent cython cython_run \ |
290 |
_VALID_PYTHON_FEATURES= allflavors autoplist build concurrent cython cython_run \ |
285 |
distutils flavors noegginfo noflavors nose nose2 \ |
291 |
distutils flavors noegginfo noflavors nose nose2 \ |
286 |
optsuffix py3kplist pytest pytest4 pythonprefix \ |
292 |
optsuffix py3kplist pytest pytest4 pythonprefix \ |
287 |
unittest unittest2 |
293 |
unittest unittest2 |
Lines 309-314
IGNORE= uses either USE_PYTHON=pytest or USE_PYTHON=pytest4, not both of them
Link Here
|
309 |
_PYTHON_FEATURE_FLAVORS= yes |
315 |
_PYTHON_FEATURE_FLAVORS= yes |
310 |
. endif |
316 |
. endif |
311 |
|
317 |
|
|
|
318 |
# build automatically generates flavors depending on the supported |
319 |
# versions. |
320 |
. if defined(_PYTHON_FEATURE_BUILD) |
321 |
_PYTHON_FEATURE_FLAVORS= yes |
322 |
. endif |
323 |
|
312 |
. if defined(_PYTHON_FEATURE_NOFLAVORS) |
324 |
. if defined(_PYTHON_FEATURE_NOFLAVORS) |
313 |
.undef _PYTHON_FEATURE_FLAVORS |
325 |
.undef _PYTHON_FEATURE_FLAVORS |
314 |
. endif |
326 |
. endif |
Lines 595-600
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${P
Link Here
|
595 |
. endif |
607 |
. endif |
596 |
. endif |
608 |
. endif |
597 |
|
609 |
|
|
|
610 |
. if defined(_PYTHON_FEATURE_BUILD) |
611 |
. if ${PYTHON_VER} == 2.7 |
612 |
DEV_ERROR+= "USES=python:2.7 is incompatible with USE_PYTHON=build" |
613 |
. endif |
614 |
. if ${_CURRENTPORT} == ${PYTHON_PKGNAMEPREFIX}build |
615 |
DEV_ERROR+= "USE_PYTHON=build can't be used to build py-build itself" |
616 |
. endif |
617 |
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}build>0:devel/py-build@${PY_FLAVOR} |
618 |
. endif |
619 |
|
598 |
# distutils support |
620 |
# distutils support |
599 |
PYSETUP?= setup.py |
621 |
PYSETUP?= setup.py |
600 |
PYDISTUTILS_SETUP?= -c \ |
622 |
PYDISTUTILS_SETUP?= -c \ |
Lines 618-623
PYDISTUTILS_PKGVERSION?=${PORTVERSION}
Link Here
|
618 |
PYDISTUTILS_EGGINFO?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info |
640 |
PYDISTUTILS_EGGINFO?= ${PYDISTUTILS_PKGNAME:C/[^A-Za-z0-9.]+/_/g}-${PYDISTUTILS_PKGVERSION:C/[^A-Za-z0-9.]+/_/g}-py${PYTHON_VER}.egg-info |
619 |
PYDISTUTILS_EGGINFODIR?=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} |
641 |
PYDISTUTILS_EGGINFODIR?=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} |
620 |
|
642 |
|
|
|
643 |
# build support |
644 |
. if defined(_PYTHON_FEATURE_BUILD) |
645 |
PYBUILD_WHEELNAME?= ${PORTNAME:S/-/_/} |
646 |
. endif |
647 |
|
621 |
# nose support |
648 |
# nose support |
622 |
. if defined(_PYTHON_FEATURE_NOSE) |
649 |
. if defined(_PYTHON_FEATURE_NOSE) |
623 |
TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}nose>=0:devel/py-nose@${PY_FLAVOR} |
650 |
TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}nose>=0:devel/py-nose@${PY_FLAVOR} |
Lines 790-795
do-install:
Link Here
|
790 |
. endif |
817 |
. endif |
791 |
. endif # defined(_PYTHON_FEATURE_DISTUTILS) |
818 |
. endif # defined(_PYTHON_FEATURE_DISTUTILS) |
792 |
|
819 |
|
|
|
820 |
. if defined(_PYTHON_FEATURE_BUILD) |
821 |
. if !target(do-configure) |
822 |
do-configure: |
823 |
@${DO_NADA} |
824 |
. endif |
825 |
|
826 |
. if !target(do-build) |
827 |
do-build: |
828 |
# PENDING: dependencies are mishandled by build: https://github.com/pypa/build/issues/504 |
829 |
cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} -m build --wheel --no-isolation --outdir ${WRKDIR} |
830 |
. endif |
831 |
|
832 |
. if !target(do-install) |
833 |
do-install: |
834 |
@if ! [ -e ${WRKDIR}/wheel ]; then ${MKDIR} ${WRKDIR}/wheel; fi; |
835 |
@cd ${WRKDIR}/wheel && \ |
836 |
unzip ${WRKDIR}/${PYBUILD_WHEELNAME}-${DISTVERSION}-*.whl && \ |
837 |
${MKDIR} ${STAGEDIR}${PYTHON_SITELIBDIR} && \ |
838 |
${CP} -r * ${STAGEDIR}${PYTHON_SITELIBDIR} |
839 |
. endif |
840 |
. endif # defined(_PYTHON_FEATURE_BUILD) |
841 |
|
793 |
. if defined(_PYTHON_FEATURE_NOSE) |
842 |
. if defined(_PYTHON_FEATURE_NOSE) |
794 |
. if !target(do-test) |
843 |
. if !target(do-test) |
795 |
do-test: |
844 |
do-test: |