aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2018-01-21 18:51:29 +0800
committermat <mat@FreeBSD.org>2018-01-21 18:51:29 +0800
commit18a8f1515e1c6e3b1726173e0dc24521a568b96d (patch)
tree16ea39132465a73c33f7c14a6fa1e16d8ccd1cd2 /Mk
parentb7a4c39daf3f495a31eb7bf9ae680b4b9ca74684 (diff)
downloadfreebsd-ports-gnome-18a8f1515e1c6e3b1726173e0dc24521a568b96d.tar.gz
freebsd-ports-gnome-18a8f1515e1c6e3b1726173e0dc24521a568b96d.tar.zst
freebsd-ports-gnome-18a8f1515e1c6e3b1726173e0dc24521a568b96d.zip
Remove PYTHON*_DEFAULT_VERSION.
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/python.mk60
-rw-r--r--Mk/bsd.sanity.mk6
2 files changed, 10 insertions, 56 deletions
diff --git a/Mk/Uses/python.mk b/Mk/Uses/python.mk
index 947f34aef9d0..c5b73d7e6401 100644
--- a/Mk/Uses/python.mk
+++ b/Mk/Uses/python.mk
@@ -225,15 +225,6 @@
# PYTHON2="" PYTHON3="@comment " for Python 2.x
# PYTHON2="@comment " PYTHON3="" for Python 3.x
#
-# Deprecated variables, which exist for compatibility and will be removed
-# soon:
-#
-# PYTHON_DEFAULT_VERSION
-# PYTHON2_DEFAULT_VERSION
-# PYTHON3_DEFAULT_VERSION
-# - Deprecated, use PYTHON[2,3]_DEFAULT instead,
-# see bsd.default-versions.mk
-#
# PYTHON_PKGNAMESUFFIX
# - Deprecated, use PYTHON_PKGNAMEPREFIX instead
# default: -py${PYTHON_SUFFIX}
@@ -301,58 +292,17 @@ _PYTHON_RUN_DEP= yes
_PYTHON_TEST_DEP= yes
.endif
-.if defined(PYTHON_DEFAULT_VERSION)
-WARNING+= "PYTHON_DEFAULT_VERSION is defined, consider using DEFAULT_VERSIONS=python=${PYTHON_DEFAULT_VERSION:S/^python//} instead"
-.endif
-.if defined(PYTHON2_DEFAULT_VERSION)
-WARNING+= "PYTHON2_DEFAULT_VERSION is defined, consider using DEFAULT_VERSIONS=python2=${PYTHON2_DEFAULT_VERSION:S/^python//} instead"
-.endif
-.if defined(PYTHON3_DEFAULT_VERSION)
-WARNING+= "PYTHON3_DEFAULT_VERSION is defined, consider using DEFAULT_VERSIONS=python3=${PYTHON3_DEFAULT_VERSION:S/^python//} instead"
-.endif
-
.if ${PYTHON2_DEFAULT} != ${PYTHON_DEFAULT} && ${PYTHON3_DEFAULT} != ${PYTHON_DEFAULT}
WARNING+= "PYTHON_DEFAULT must be a version present in PYTHON2_DEFAULT or PYTHON3_DEFAULT, if you want more Python flavors, set BUILD_ALL_PYTHON_FLAVORS in your make.conf"
.endif
-.if exists(${LOCALBASE}/bin/python)
-.if !defined(_PYTHON_DEFAULT_VERSION)
-_PYTHON_DEFAULT_VERSION!= (${LOCALBASE}/bin/python -c \
- 'import sys; print("%d.%d" % sys.version_info[:2])' 2> /dev/null \
- || ${ECHO_CMD} ${_PYTHON_PORTBRANCH}) | ${TAIL} -1
-.endif
-_EXPORTED_VARS+= _PYTHON_DEFAULT_VERSION
-.if defined(PYTHON_DEFAULT) && (${PYTHON_DEFAULT} != ${_PYTHON_DEFAULT_VERSION})
-WARNING+= "Your requested default python version ${PYTHON_DEFAULT} is different from the installed default python interpreter version ${_PYTHON_DEFAULT_VERSION}"
-.endif
-PYTHON_DEFAULT_VERSION= python${_PYTHON_DEFAULT_VERSION}
-.else
-PYTHON_DEFAULT_VERSION= python${PYTHON_DEFAULT}
-.endif # exists(${LOCALBASE}/bin/python)
-
-# Is only a meta-port version defined?
-.if ${PYTHON_DEFAULT_VERSION} == "python2"
-PYTHON2_DEFAULT_VERSION?= python${PYTHON2_DEFAULT}
-.elif ${PYTHON_DEFAULT_VERSION:R} == "python2"
-PYTHON2_DEFAULT_VERSION= ${PYTHON_DEFAULT_VERSION}
-.else
-PYTHON2_DEFAULT_VERSION?= python${PYTHON2_DEFAULT}
-.endif
-.if ${PYTHON_DEFAULT_VERSION} == "python3"
-PYTHON3_DEFAULT_VERSION?= python${PYTHON3_DEFAULT}
-.elif ${PYTHON_DEFAULT_VERSION:R} == "python3"
- PYTHON3_DEFAULT_VERSION= ${PYTHON_DEFAULT_VERSION}
-.else
-PYTHON3_DEFAULT_VERSION?= python${PYTHON3_DEFAULT}
-.endif
-
# Keep this before the FLAVOR selection to get the meta port dependency.
.if ${_PYTHON_ARGS} == "2"
-_PYTHON_ARGS= ${PYTHON2_DEFAULT_VERSION:S/^python//}
+_PYTHON_ARGS= ${PYTHON2_DEFAULT}
_WANTS_META_PORT= 2
DEV_WARNING+= "USES=python:2 is deprecated, use USES=python:2.7"
.elif ${_PYTHON_ARGS} == "3"
-_PYTHON_ARGS= ${PYTHON3_DEFAULT_VERSION:S/^python//}
+_PYTHON_ARGS= ${PYTHON3_DEFAULT}
_WANTS_META_PORT= 3
DEV_WARNING+= "USES=python:3 is deprecated, use USES=python:3.4+ or an appropriate version range"
.endif # ${_PYTHON_ARGS} == "2"
@@ -375,7 +325,7 @@ DEV_WARNING+= "USES=python:3 is deprecated, use USES=python:3.4+ or an appropri
# (_PYTHON_VERSION_NONSUPPORTED).
_PYTHON_VERSION:= ${PYTHON_VERSION:S/^python//}
.else
-_PYTHON_VERSION:= ${PYTHON_DEFAULT_VERSION:S/^python//}
+_PYTHON_VERSION:= ${PYTHON_DEFAULT}
.endif # defined(PYTHON_VERSION)
# Validate Python version whether it meets the version restriction.
@@ -476,7 +426,7 @@ PY_FLAVOR= py${_PYTHON_VERSION:S/.//}
# the supported version range.
PYTHON_VERSION?= python${_PYTHON_VERSION}
.if !defined(PYTHON_NO_DEPENDS) && \
- ${PYTHON_VERSION} != ${PYTHON_DEFAULT_VERSION}
+ ${PYTHON_VERSION} != python${PYTHON_DEFAULT}
DEPENDS_ARGS+= PYTHON_VERSION=${PYTHON_VERSION}
.endif
@@ -573,7 +523,7 @@ DEV_WARNING+= "USE_PYTHON=concurrent when only one of Python 2 or 3 is supported
_USES_POST+= uniquefiles:dirs
.if defined(_PYTHON_FEATURE_FLAVORS) && ${FLAVOR} == ${FLAVORS:[1]}
UNIQUE_DEFAULT_LINKS= yes
-.elif !defined(_PYTHON_FEATURE_FLAVORS) && ${PYTHON_VERSION} == ${PYTHON_DEFAULT_VERSION}
+.elif !defined(_PYTHON_FEATURE_FLAVORS) && ${PYTHON_VERSION} == python${PYTHON_DEFAULT}
UNIQUE_DEFAULT_LINKS= yes
.else
UNIQUE_DEFAULT_LINKS= no
diff --git a/Mk/bsd.sanity.mk b/Mk/bsd.sanity.mk
index d4cd0e1b177b..1bf6f20feef2 100644
--- a/Mk/bsd.sanity.mk
+++ b/Mk/bsd.sanity.mk
@@ -16,7 +16,8 @@ WARNING+= "WITHOUT_${opt} is unsupported, use WITHOUT=${opt} on the command
ALL_UNSUPPORTED= WITHOUT_NLS NOPORTDOCS NOPORTEXAMPLES WITH_BDB_VER \
OVERRIDE_LINUX_BASE_PORT WITH_OPENSSL_PORT \
- WITH_OPENSSL_BASE
+ WITH_OPENSSL_BASE PYTHON_DEFAULT_VERSION \
+ PYTHON2_DEFAULT_VERSION PYTHON3_DEFAULT_VERSION
ALL_DEPRECATED=
ALL_NOTNEEDED= WITH_NEW_XORG WITHOUT_NEW_XORG WITH_KMS WITHOUT_KMS
@@ -31,6 +32,9 @@ WITH_NEW_XORG_ALT= "removed and has no effect"
WITHOUT_NEW_XORG_ALT= ${WITH_NEW_XORG_ALT}
WITH_MKS_ALT= "removed and has no effect"
WITHOUT_MKS_ALT= ${WITH_MKS_ALT}
+PYTHON_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python=${PYTHON_DEFAULT_VERSION:S/^python//}"
+PYTHON2_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python2=${PYTHON2_DEFAULT_VERSION:S/^python//}"
+PYTHON3_DEFAULT_VERSION_ALT= "DEFAULT_VERSIONS=python3=${PYTHON3_DEFAULT_VERSION:S/^python//}"
.for a in ${ALL_DEPRECATED}
.if defined(${a})