From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 64BBD1381F3 for ; Wed, 21 Aug 2013 19:54:57 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D04A3E0A68; Wed, 21 Aug 2013 19:54:56 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 167B2E09CB for ; Wed, 21 Aug 2013 19:54:56 +0000 (UTC) Received: from pomiot.lan (77-254-183-247.adsl.inetia.pl [77.254.183.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 3B41133ECAE; Wed, 21 Aug 2013 19:54:54 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-python@lists.gentoo.org Cc: python@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-python] [PATCH python-utils-r1 2/4] Use python_is_python3 in the eclass. Date: Wed, 21 Aug 2013 21:54:24 +0200 Message-Id: <1377114866-2669-2-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <20130821215352.3ba7a2af@gentoo.org> References: <20130821215352.3ba7a2af@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Discussions centering around the Python ecosystem in Gentoo Linux X-BeenThere: gentoo-python@gentoo.org X-BeenThere: gentoo-python@lists.gentoo.org X-Archives-Salt: 4a4d1539-2a68-4783-b4c9-efbf68ef90b3 X-Archives-Hash: 1d2490bc43a590eb602dd1057e7ddf53 --- gx86/eclass/python-utils-r1.eclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gx86/eclass/python-utils-r1.eclass b/gx86/eclass/python-utils-r1.eclass index 00399d2..e798c8d 100644 --- a/gx86/eclass/python-utils-r1.eclass +++ b/gx86/eclass/python-utils-r1.eclass @@ -532,8 +532,8 @@ _python_rewrite_shebang() { die "${FUNCNAME}: ${f} does not seem to have a valid shebang" fi - if [[ ${from} == python2 && ${impl} == python3* - || ${from} == python3 && ${impl} != python3* ]]; then + if [[ ${from} == python2 ]] && python_is_python3 "${impl}" \ + || [[ ${from} == python3 ]] && ! python_is_python3 "${impl}"; then eerror "A file does have shebang not supporting requested impl:" eerror " file: ${f}" eerror " shebang: ${shebang}" @@ -883,9 +883,9 @@ python_wrapper_setup() { python_export "${impl}" EPYTHON PYTHON local pyver - if [[ ${EPYTHON} == python3* ]]; then + if python_is_python3; then pyver=3 - else # includes pypy & jython + else pyver=2 fi -- 1.8.3.2