Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145150018
D4711.id11696.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D4711.id11696.diff
View Options
Index: Mk/Uses/python.mk
===================================================================
--- Mk/Uses/python.mk
+++ Mk/Uses/python.mk
@@ -6,7 +6,7 @@
#
# Feature: python
# Usage: USES=python or USES=python:args
-# Valid ARGS: <version>, build, run
+# Valid ARGS: <version>, build, run, test
#
# version If your port requires only some set of Python versions, you
# can set this to [min]-[max] or min+ or -max or as an
@@ -26,9 +26,12 @@
# it as BUILD_DEPENDS.
# run Indicates that Python is needed at run time and adds
# it as RUN_DEPENDS.
+# test Incidates that Python is needed at test time and adds
+# it as TEST_DEPENDS.
#
-# If build and run are omitted, Python will be added as BUILD_DEPENDS and
-# RUN_DEPENDS. PYTHON_NO_DEPENDS can be set to not add any dependencies.
+# If build and run are omitted, Python will be added as BUILD_DEPENDS,
+# RUN_DEPENDS and TEST_DEPENDS. PYTHON_NO_DEPENDS can be set to not add any
+# dependencies.
#
# Variables, which can be set by a user:
#
@@ -231,6 +234,7 @@
# pollutes the build/run dependency detection
.undef _PYTHON_BUILD_DEP
.undef _PYTHON_RUN_DEP
+.undef _PYTHON_TEST_DEP
_PYTHON_ARGS= ${python_ARGS:S/,/ /g}
.if ${_PYTHON_ARGS:Mbuild}
_PYTHON_BUILD_DEP= yes
@@ -240,13 +244,18 @@
_PYTHON_RUN_DEP= yes
_PYTHON_ARGS:= ${_PYTHON_ARGS:Nrun}
.endif
+.if ${_PYTHON_ARGS:Mtest}
+_PYTHON_TEST_DEP= yes
+_PYTHON_ARGS:= ${_PYTHON_ARGS:Ntest}
+.endif
# The port does not specify a build or run dependency, assume both are
# required.
.if !defined(_PYTHON_BUILD_DEP) && !defined(_PYTHON_RUN_DEP) && \
- !defined(PYTHON_NO_DEPENDS)
+ !defined(_PYTHON_TEST_DEP) && !defined(PYTHON_NO_DEPENDS)
_PYTHON_BUILD_DEP= yes
_PYTHON_RUN_DEP= yes
+_PYTHON_TEST_DEP= yes
.endif
# Determine version number of Python to use
@@ -461,6 +470,7 @@
${_CURRENTPORT:S/${PYTHON_SUFFIX}$//} != ${PYTHON_PKGNAMEPREFIX}setuptools
BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools${PYTHON_SUFFIX}>0:${PORTSDIR}/devel/py-setuptools${PYTHON_SUFFIX}
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools${PYTHON_SUFFIX}>0:${PORTSDIR}/devel/py-setuptools${PYTHON_SUFFIX}
+TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}setuptools${PYTHON_SUFFIX}>0:${PORTSDIR}/devel/py-setuptools${PYTHON_SUFFIX}
.endif
# distutils support
@@ -563,6 +573,12 @@
RUN_DEPENDS+= python${_WANTS_META_PORT}:${_PYTHON_RELPORTDIR}${_WANTS_META_PORT}
.endif
.endif
+.if defined(_PYTHON_TEST_DEP)
+TEST_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR}
+.if defined(_WANTS_META_PORT)
+TEST_DEPENDS+= python${_WANTS_META_PORT}:${_PYTHON_RELPORTDIR}${_WANTS_META_PORT}
+.endif
+.endif
# set $PREFIX as Python's one
.if defined(_PYTHON_FEATURE_PYTHONPREFIX)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 17, 12:04 PM (13 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28813131
Default Alt Text
D4711.id11696.diff (2 KB)
Attached To
Mode
D4711: Mk/Uses/python.mk: Add support for optional 'test' argument
Attached
Detach File
Event Timeline
Log In to Comment