View | Details | Raw Unified | Return to bug 255722 | Differences between
and this patch

Collapse All | Expand All

(-)b/Mk/Uses/python.mk (-1 / +39 lines)
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 281-287 _PYTHON_BASECMD= ${LOCALBASE}/bin/python Link Here
281
_PYTHON_RELPORTDIR=		lang/python
284
_PYTHON_RELPORTDIR=		lang/python
282
285
283
# List all valid USE_PYTHON features here
286
# List all valid USE_PYTHON features here
284
_VALID_PYTHON_FEATURES=	allflavors autoplist concurrent cython cython_run \
287
_VALID_PYTHON_FEATURES=	allflavors autoplist build concurrent cython cython_run \
285
			distutils flavors noegginfo noflavors nose nose2 \
288
			distutils flavors noegginfo noflavors nose nose2 \
286
			optsuffix py3kplist pytest pytest4 pythonprefix \
289
			optsuffix py3kplist pytest pytest4 pythonprefix \
287
			unittest unittest2
290
			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
312
_PYTHON_FEATURE_FLAVORS=	yes
310
.  endif
313
.  endif
311
314
315
# build automatically generates flavors depending on the supported
316
# versions.
317
.  if defined(_PYTHON_FEATURE_BUILD)
318
_PYTHON_FEATURE_FLAVORS=	yes
319
.  endif
320
312
.  if defined(_PYTHON_FEATURE_NOFLAVORS)
321
.  if defined(_PYTHON_FEATURE_NOFLAVORS)
313
.undef _PYTHON_FEATURE_FLAVORS
322
.undef _PYTHON_FEATURE_FLAVORS
314
.  endif
323
.  endif
Lines 595-600 RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools>=63.1.0:devel/py-setuptools@${P Link Here
595
.    endif
604
.    endif
596
.  endif
605
.  endif
597
606
607
.  if defined(_PYTHON_FEATURE_BUILD)
608
.    if ${PYTHON_VER} == 2.7
609
DEV_ERROR+=		"USES=python:2.7 is incompatible with USE_PYTHON=build"
610
.    endif
611
.    if ${_CURRENTPORT} == ${PYTHON_PKGNAMEPREFIX}build
612
DEV_ERROR+=		"USE_PYTHON=build can't be used to build py-build itself"
613
.    endif
614
BUILD_DEPENDS+=		${PYTHON_PKGNAMEPREFIX}build>0:devel/py-build@${PY_FLAVOR} \
615
			${PYTHON_PKGNAMEPREFIX}installer>0:devel/py-installer@${PY_FLAVOR}
616
.  endif
617
598
# distutils support
618
# distutils support
599
PYSETUP?=		setup.py
619
PYSETUP?=		setup.py
600
PYDISTUTILS_SETUP?=	-c \
620
PYDISTUTILS_SETUP?=	-c \
Lines 790-795 do-install: Link Here
790
.    endif
810
.    endif
791
.  endif # defined(_PYTHON_FEATURE_DISTUTILS)
811
.  endif # defined(_PYTHON_FEATURE_DISTUTILS)
792
812
813
.  if defined(_PYTHON_FEATURE_BUILD)
814
.    if !target(do-configure)
815
do-configure:
816
	@${DO_NADA}
817
.    endif
818
819
.    if !target(do-build)
820
do-build:
821
	# PENDING: dependencies are mishandled by build: https://github.com/pypa/build/issues/504
822
	cd ${BUILD_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} -m build --wheel --no-isolation --outdir ${WRKDIR}
823
.    endif
824
825
.    if !target(do-install)
826
do-install:
827
	@cd ${INSTALL_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} -m installer ${WRKDIR}/*.whl --destdir ${STAGEDIR}
828
.    endif
829
.  endif # defined(_PYTHON_FEATURE_BUILD)
830
793
.  if defined(_PYTHON_FEATURE_NOSE)
831
.  if defined(_PYTHON_FEATURE_NOSE)
794
.    if !target(do-test)
832
.    if !target(do-test)
795
do-test:
833
do-test:

Return to bug 255722