From owner-svn-ports-all@freebsd.org Thu Jan 9 13:33:02 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D64C1EE599; Thu, 9 Jan 2020 13:33:02 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47tn9p0ThYz47bH; Thu, 9 Jan 2020 13:33:02 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E904919CA; Thu, 9 Jan 2020 13:33:01 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 009DX1ii002065; Thu, 9 Jan 2020 13:33:01 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 009DX19O002064; Thu, 9 Jan 2020 13:33:01 GMT (envelope-from mat@FreeBSD.org) Message-Id: <202001091333.009DX19O002064@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Thu, 9 Jan 2020 13:33:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r522487 - head/Mk/Uses X-SVN-Group: ports-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: head/Mk/Uses X-SVN-Commit-Revision: 522487 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jan 2020 13:33:02 -0000 Author: mat Date: Thu Jan 9 13:33:01 2020 New Revision: 522487 URL: https://svnweb.freebsd.org/changeset/ports/522487 Log: Cleanup after removing PYTHON_VERSION from DEPENDS_ARGS. Much of the Python version selection code had compat shims around to accomodate the transition from before to with flavors. These can now be removed. PR: 243185 Reviewed by: antoine Differential Revision: https://reviews.freebsd.org/D23084 Modified: head/Mk/Uses/python.mk Modified: head/Mk/Uses/python.mk ============================================================================== --- head/Mk/Uses/python.mk Thu Jan 9 13:32:55 2020 (r522486) +++ head/Mk/Uses/python.mk Thu Jan 9 13:33:01 2020 (r522487) @@ -330,26 +330,7 @@ DEV_ERROR+= "USES=python:2 is no longer supported, us 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 @@ _PYTHON_VERSION_NONSUPPORTED= ${_PYTHON_VERSION_MAXIMU # 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,22 +431,8 @@ PKGNAMESUFFIX= ${PYTHON_PKGNAMESUFFIX} # - 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} +PYTHON_VERSION= python${_PYTHON_VERSION} -# 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 -# - # Got the correct python version, set some publicly accessible variables PYTHON_VER= ${_PYTHON_VERSION} PYTHON_SUFFIX= ${_PYTHON_VERSION:S/.//g} @@ -553,7 +516,7 @@ DEV_WARNING+= "USE_PYTHON=concurrent when only one of _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