From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A1F97139694 for ; Fri, 21 Apr 2017 14:12:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4237AE0C3D; Fri, 21 Apr 2017 14:11:54 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id F1677E0C31 for ; Fri, 21 Apr 2017 14:11:53 +0000 (UTC) Received: from localhost.localdomain (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 833EB33FE7D; Fri, 21 Apr 2017 14:11:51 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: python@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH] python-utils-r1.eclass: python_wrapper_setup, do not query PYTHON_CONFIG Date: Fri, 21 Apr 2017 16:11:43 +0200 Message-Id: <20170421141143.21147-1-mgorny@gentoo.org> X-Mailer: git-send-email 2.12.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 930f1b1a-e9b2-4283-b8f1-7866ab7bbd69 X-Archives-Hash: 2118135a5ca3dcbca2d4123905ee0cf5 Use plain 'pythonX.Y-config' executable name in the python-config wrapper instead of querying the complete PYTHON_CONFIG path from python_export. Constructing full PYTHON_CONFIG path requires querying ABIFLAGS which requires the Python interpreter to be installed, which in turn unnecessarily forces every ebuild using the eclass to carry a build-time dependency on the Python interpreter. All current versions of Python correctly install 'pythonX.Y-config' symlink that points to the correct ABI-suffixed binary. It is therefore unnecessary to use the full path. --- eclass/python-utils-r1.eclass | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index a67e378d3997..49a605b9e159 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -943,7 +943,7 @@ python_wrapper_setup() { rm -f "${workdir}"/bin/2to3 || die rm -f "${workdir}"/pkgconfig/python{,2,3}.pc || die - local EPYTHON PYTHON PYTHON_CONFIG + local EPYTHON PYTHON python_export "${impl}" EPYTHON PYTHON local pyver pyother @@ -970,11 +970,9 @@ python_wrapper_setup() { # CPython-specific if [[ ${EPYTHON} == python* ]]; then - python_export "${impl}" PYTHON_CONFIG - cat > "${workdir}/bin/python-config" <<-_EOF_ || die #!/bin/sh - exec "${PYTHON_CONFIG}" "\${@}" + exec "${PYTHON}-config" "\${@}" _EOF_ cp "${workdir}/bin/python-config" \ "${workdir}/bin/python${pyver}-config" || die -- 2.12.2