Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140077239
D581.id1032.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
D581.id1032.diff
View Options
Index: Mk/Uses/python.mk
===================================================================
--- Mk/Uses/python.mk
+++ Mk/Uses/python.mk
@@ -247,6 +247,25 @@
.endif
# COMPAT KNOBS, remove them, once the tree is cleaned
+.undef _PY_COMPAT_OLD
+# We will reuse USE_PYTHON with a different meaning, so make sure that, while
+# we are in the transition phase from USE_PYTHON -> USES=python, it is mapped
+# and reassigned correctly
+.if defined(USE_PYTHON_BUILD) || defined(USE_PYTHON_RUN)
+# old style
+_PY_COMPAT_OLD= yes
+.elif defined(USE_PYTHON)
+.if ${USE_PYTHON} == "yes" || ${USE_PYTHON} == "build" || \
+ ${USE_PYTHON} == "run" || ${USE_PYTHON} == "2" || ${USE_PYTHON} == "3"
+# old style
+_PY_COMPAT_OLD= yes
+.elif ${USE_PYTHON:tW:M*[1-9].[0-9]*} != ""
+# old style X.Y, X.Y+, X.Y-, -X.Y, X.Y-Z.A
+_PY_COMPAT_OLD= yes
+.endif # ${USE_PYTHON} == "yes" ...
+.endif # defined(USE_PYTHON_BUILD) || defined(USE_PYTHON_RUN)
+
+.if defined(_PY_COMPAT_OLD)
.if defined(USE_PYTHON)
.if ${USE_PYTHON} != "yes"
python_ARGS= ${USE_PYTHON}
@@ -260,31 +279,39 @@
python_ARGS= ${USE_PYTHON_RUN},run
.endif
.endif # defined(USE_PYTHON)
-.if !defined(PYTHON_FEATURES)
-PYTHON_FEATURES=
+# Everything passed to python_ARGS, undef USE_PYTHON, since we will reuse
+# it with a different meaning below
+.undef USE_PYTHON
+.endif # defined(_PY_COMPAT_OLD)
+.undef _PY_COMPAT_OLD
+
+
+.if !defined(USE_PYTHON)
+USE_PYTHON=
.if defined(USE_PYDISTUTILS)
-PYTHON_FEATURES+= distutils
+USE_PYTHON+= distutils
.endif
+
.if defined(PYDISTUTILS_AUTOPLIST)
-PYTHON_FEATURES+= autoplist
+USE_PYTHON+= autoplist
.endif
.if defined(PYTHON_PY3K_PLIST_HACK)
-PYTHON_FEATURES+= py3kplist
+USE_PYTHON+= py3kplist
.endif
.if defined(PYTHON_CONCURRENT_INSTALL)
-PYTHON_FEATURES+= concurrent
+USE_PYTHON+= concurrent
.endif
.if defined(USE_PYTHON_PREFIX)
-PYTHON_FEATURES+= pythonprefix
+USE_PYTHON+= pythonprefix
.endif
.if defined(PYDISTUTILS_NOEGGINFO)
-PYTHON_FEATURES+= noegginfo
+USE_PYTHON+= noegginfo
.endif
-.endif # !defined(PYTHON_FEATURES)
+.endif # !defined(USE_PYTHON)
# COMPAT KNOBS END
# Make each individual feature available as _PYTHON_FEATURE_<FEATURENAME>
-.for var in ${PYTHON_FEATURES:S/,/ /g}
+.for var in ${USE_PYTHON:S/,/ /g}
_PYTHON_FEATURE_${var:tu}= yes
.endfor
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 20, 10:37 PM (9 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27101934
Default Alt Text
D581.id1032.diff (2 KB)
Attached To
Mode
D581: Reuse USE_PYTHON instead of PYTHON_FEATURES
Attached
Detach File
Event Timeline
Log In to Comment