Commit 18a8f151 authored by mat's avatar mat
Browse files

Remove PYTHON*_DEFAULT_VERSION.

parent b7a4c39d
......@@ -10,6 +10,12 @@ in the release notes and/or placed into UPDATING.
All ports committers are allowed to commit to this file.
20180116:
AUTHOR: mat@FreeBSD.org
The deprecated PYTHON_DEFAULT_VERSION, PYTHON2_DEFAULT_VERSION, and
PYTHON3_DEFAULT_VERSION have been removed.
20180106:
AUTHOR: kde@FreeBSD.org
......
......@@ -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
......
......@@ -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})
......
......@@ -25,7 +25,7 @@ PLIST_FILES= "@sample %%PYTHON_SITELIBDIR%%/easy-install.pth.dist %%PYTHON_SITEL
.include <bsd.port.pre.mk>
.if ${PYTHON_VERSION} != ${PYTHON_DEFAULT_VERSION}
.if ${FLAVOR} != ${FLAVORS:[1]}
SUB_FILES+= pkg-message
SUB_LIST+= PYTHON_VER=${PYTHON_VER}
.endif
......
......@@ -12,7 +12,7 @@ MAINTAINER= python@FreeBSD.org
COMMENT= The "meta-port" for version 2 of the Python interpreter
USES= python:run
PYTHON_VERSION= ${PYTHON2_DEFAULT_VERSION}
PYTHON_VERSION= python${PYTHON2_DEFAULT}
NO_BUILD= yes
PLIST_FILES= bin/2to3-${PYTHON_MAJOR_VER} \
......
......@@ -12,7 +12,7 @@ MAINTAINER= python@FreeBSD.org
COMMENT= The "meta-port" for version 3 of the Python interpreter
USES= python:run
PYTHON_VERSION= ${PYTHON3_DEFAULT_VERSION}
PYTHON_VERSION= python${PYTHON3_DEFAULT}
NO_BUILD= yes
PLIST_FILES= bin/2to3-${PYTHON_MAJOR_VER} \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment