Index: Mk/Uses/python.mk =================================================================== --- Mk/Uses/python.mk +++ Mk/Uses/python.mk @@ -330,26 +330,7 @@ DEV_ERROR+= "USES=python:3 is no longer supported, use USES=python:3.5+ or an appropriate version range" .endif # ${_PYTHON_ARGS} == "2" -.if defined(PYTHON_VERSION) -# A port/user requests a specific python version for its dependencies via -# DEPENDS_ARGS, since it requires the specific python version itself. -# Several things can happen now: -# a) the dependency supports the requested version -> everything's fine -# b) the dependency does not support the requested version -# 1) the dependency works in a way that the different python -# versions do not matter -> everything's fine -# 2) the dependency is likely to break due to the conflict -# nothing's fine -# -# b.2) needs to be resolved. Due to the complexity of how different pieces of -# software are built, we can't solve this automatically. Instead, let's assume -# that maintainers know what they are doing and assume PYTHON_VERSION to be a -# hint. Just warn maintainers, if the versions do not match -# (_PYTHON_VERSION_NONSUPPORTED). -_PYTHON_VERSION:= ${PYTHON_VERSION:S/^python//} -.else _PYTHON_VERSION:= ${PYTHON_DEFAULT} -.endif # defined(PYTHON_VERSION) # Validate Python version whether it meets the version restriction. _PYTHON_VERSION_CHECK:= ${_PYTHON_ARGS:C/^([1-9]\.[0-9])$/\1-\1/} @@ -374,10 +355,6 @@ # If we have an unsupported version of Python, try another. .if defined(_PYTHON_VERSION_NONSUPPORTED) -.if defined(PYTHON_VERSION) || defined(PYTHON_CMD) -_PV:= ${_PYTHON_VERSION} # preserve the specified python version -IGNORE= needs Python ${_PYTHON_VERSION_NONSUPPORTED}, but ${_PV} was specified -.endif # defined(PYTHON_VERSION) || defined(PYTHON_CMD) .undef _PYTHON_VERSION .for ver in ${PYTHON2_DEFAULT} ${PYTHON3_DEFAULT} ${_PYTHON_VERSIONS} __VER= ${ver} @@ -454,25 +431,7 @@ # - From PYTHON_DEFAULT PY_FLAVOR= py${_PYTHON_VERSION:S/.//} -# Pass PYTHON_VERSION down the dependency chain. This ensures that -# port A -> B -> C all will use the same python version and do not -# try to find a different one, if the passed version fits into -# the supported version range. -PYTHON_VERSION?= python${_PYTHON_VERSION} -.if !defined(PYTHON_NO_DEPENDS) && \ - ${PYTHON_VERSION} != python${PYTHON_DEFAULT} -DEPENDS_ARGS+= PYTHON_VERSION=${PYTHON_VERSION} -.endif - -# NOTE: -# -# PYTHON_VERSION will hold whatever is passed down the dependency chain. -# If a user runs `make PYTHON_VERSION=python3.5, PYTHON_VERSION will be -# set to 'python3.5'. A port however may require a different version, -# which is stored (above) in _PYTHON_VERSION. -# Every python bit below hence should use python${_PYTHON_VERSION}, since -# this is the value, the _port_ requires -# +PYTHON_VERSION= python${_PYTHON_VERSION} # Got the correct python version, set some publicly accessible variables PYTHON_VER= ${_PYTHON_VERSION} @@ -557,7 +516,7 @@ _USES_POST+= uniquefiles:dirs .if defined(_PYTHON_FEATURE_FLAVORS) && ${FLAVOR} == ${FLAVORS:[1]} UNIQUE_DEFAULT_LINKS= yes -.elif !defined(_PYTHON_FEATURE_FLAVORS) && ${PYTHON_VERSION} == python${PYTHON_DEFAULT} +.elif !defined(_PYTHON_FEATURE_FLAVORS) && ${_PYTHON_VERSION} == ${PYTHON_DEFAULT} UNIQUE_DEFAULT_LINKS= yes .else UNIQUE_DEFAULT_LINKS= no Index: lang/python/Makefile =================================================================== --- lang/python/Makefile +++ lang/python/Makefile @@ -33,37 +33,4 @@ .endfor ${LN} -sf python${PYTHON_MAJOR_VER}-config ${STAGEDIR}${PREFIX}/bin/python-config -# Major upgrade support -PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portupgrade - -.if defined(USE_PORTMASTER) -PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portmaster -.endif - -PKG_LIST= ${PKG_BIN} query -a '%n-%v' -PKG_LIST_FILES= ${PKG_INFO} -l - -upgrade-site-packages: - @if [ ! -x ${PORTUPGRADE_CMD} ]; then \ - ${ECHO_MSG} "Please install ports-mgmt/portupgrade."; \ - ${FALSE}; \ - fi - - @GREP_ARGS="-q"; \ - for ver in `echo ${_PYTHON_ALLBRANCHES:C/${PYTHON_VER}//}`; do \ - GREP_ARGS="$${GREP_ARGS} -e lib/python$$ver"; \ - done; \ - UPD=""; \ - for pkg in `${PKG_LIST}`; do \ - ${PKG_LIST_FILES} $${pkg} | ${GREP} $${GREP_ARGS} && \ - UPD="$${UPD} $${pkg}"; \ - done; \ - if [ "$${UPD}" ]; then \ - if [ -n ${PORTUPGRADE_ARGS} ]; then \ - ${PORTUPGRADE_CMD} ${PORTUPGRADE_ARGS} -f $${UPD}; \ - else \ - ${PORTUPGRADE_CMD} -f $${UPD}; \ - fi; \ - fi; \ - .include Index: lang/python2/Makefile =================================================================== --- lang/python2/Makefile +++ lang/python2/Makefile @@ -14,7 +14,7 @@ DEPRECATED= EOLed upstream EXPIRATION_DATE= 2020-12-31 -USES= python:run +USES= python:2.7,run NO_ARCH= yes NO_BUILD= yes @@ -27,10 +27,6 @@ bin/python${PYTHON_MAJOR_VER}-config \ libdata/pkgconfig/python${PYTHON_MAJOR_VER}.pc -.include - -RUN_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} - do-install: .for file in idle pydoc python ${LN} -sf ${file}${PYTHON_VER} \ @@ -43,14 +39,4 @@ ${LN} -sf python-${PYTHON_VER}.pc \ ${STAGEDIR}${PREFIX}/libdata/pkgconfig/python${PYTHON_MAJOR_VER}.pc -# Major upgrade support -PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portupgrade - -.if defined(USE_PORTMASTER) -PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portmaster -.endif - -PKG_LIST= ${PKG_BIN} query -a '%n-%v' -PKG_LIST_FILES= ${PKG_INFO} -l - -.include +.include Index: lang/python3/Makefile =================================================================== --- lang/python3/Makefile +++ lang/python3/Makefile @@ -11,11 +11,10 @@ MAINTAINER= python@FreeBSD.org COMMENT= The "meta-port" for version 3 of the Python interpreter -USES= python:run +USES= python:3.5+,run NO_ARCH= yes NO_BUILD= yes -PYTHON_VERSION= python${PYTHON3_DEFAULT} PLIST_FILES= bin/2to3-${PYTHON_MAJOR_VER} \ bin/idle${PYTHON_MAJOR_VER} \ @@ -24,10 +23,6 @@ bin/python${PYTHON_MAJOR_VER}-config \ libdata/pkgconfig/python${PYTHON_MAJOR_VER}.pc -.include - -RUN_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR} - do-install: ${LN} -sf python${PYTHON_VER} \ ${STAGEDIR}${PREFIX}/bin/python${PYTHON_MAJOR_VER} @@ -42,14 +37,4 @@ ${LN} -sf python-${PYTHON_VER}.pc \ ${STAGEDIR}${PREFIX}/libdata/pkgconfig/python${PYTHON_MAJOR_VER}.pc -# Major upgrade support -PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portupgrade - -.if defined(USE_PORTMASTER) -PORTUPGRADE_CMD= ${LOCALBASE}/sbin/portmaster -.endif - -PKG_LIST= ${PKG_BIN} query -a '%n-%v' -PKG_LIST_FILES= ${PKG_INFO} -l - -.include +.include