From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1S2U2Z-0004PW-74 for garchives@archives.gentoo.org; Tue, 28 Feb 2012 20:52:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6A8D6E078A; Tue, 28 Feb 2012 20:52:18 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 24200E078A for ; Tue, 28 Feb 2012 20:52:18 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5703C1B401E for ; Tue, 28 Feb 2012 20:52:17 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 08212E540D for ; Tue, 28 Feb 2012 20:52:15 +0000 (UTC) From: "Krzysztof Pawlik" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Krzysztof Pawlik" Message-ID: <1330278052.5d3bba49fc5957f68193ea9e29f2822beb596bc4.nelchael@gentoo> Subject: [gentoo-commits] dev/nelchael:master commit in: eclass/, profiles/desc/ X-VCS-Repository: dev/nelchael X-VCS-Files: eclass/python-distutils-ng.eclass profiles/desc/python_targets.desc X-VCS-Directories: eclass/ profiles/desc/ X-VCS-Committer: nelchael X-VCS-Committer-Name: Krzysztof Pawlik X-VCS-Revision: 5d3bba49fc5957f68193ea9e29f2822beb596bc4 X-VCS-Branch: master Date: Tue, 28 Feb 2012 20:52:15 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: ec9400eb-17e8-4574-91b0-d10552e43e53 X-Archives-Hash: 23c49d379a54cdac342111257302dc3d commit: 5d3bba49fc5957f68193ea9e29f2822beb596bc4 Author: Krzysztof Pawlik none> AuthorDate: Sun Feb 26 17:40:52 2012 +0000 Commit: Krzysztof Pawlik gentoo org> CommitDate: Sun Feb 26 17:40:52 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/nelchael.git;a= =3Dcommit;h=3D5d3bba49 Use implementationX_Y notation istead of implementationXY. --- eclass/python-distutils-ng.eclass | 48 +++++++++++++++++++------------= ----- profiles/desc/python_targets.desc | 16 ++++++------ 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/eclass/python-distutils-ng.eclass b/eclass/python-distutils-= ng.eclass index 880b525..48de447 100644 --- a/eclass/python-distutils-ng.eclass +++ b/eclass/python-distutils-ng.eclass @@ -23,10 +23,10 @@ =20 if [[ -z "${USE_PYTHON}" ]]; then # Default: pure python, support all implementations - USE_PYTHON=3D" python25 python26 python27" - USE_PYTHON+=3D" python31 python32" - USE_PYTHON+=3D" jython25" - USE_PYTHON+=3D" pypy17 pypy18" + USE_PYTHON=3D" python2_5 python2_6 python2_7" + USE_PYTHON+=3D" python3_1 python3_2" + USE_PYTHON+=3D" jython2_5" + USE_PYTHON+=3D" pypy1_7 pypy1_8" fi =20 # @ECLASS-VARIABLE: PYTHON_OPTIONAL @@ -60,13 +60,14 @@ esac # # `implementation' has to be one of the valid values for USE_PYTHON. _python-distutils-ng_generate_depend() { - case "${1}" in - python??) - echo "dev-lang/${1::-2}:${1: -2:-1}.${1: -1}" ;; - jython??) - echo "dev-java/${1::-2}:${1: -2:-1}.${1: -1}" ;; - pypy??) - echo "dev-python/${1::-2}:${1: -2:-1}.${1: -1}" ;; + local impl=3D"${1/_/.}" + case "${impl}" in + python?.?) + echo "dev-lang/${impl::-3}:${impl: -3}" ;; + jython?.?) + echo "dev-java/${impl::-3}:${impl: -3}" ;; + pypy?.?) + echo "dev-python/${impl::-3}:${impl: -3}" ;; *) die "Unsupported implementation: ${1}" ;; esac @@ -81,10 +82,11 @@ _python-distutils-ng_generate_depend() { # Binary returned by this function should be used instead of simply call= ing # `python'. _python-distutils-ng_get_binary_for_implementation() { - case "${1}" in - python??|jython??) - echo "/usr/bin/${1::-1}.${1: -1}" ;; - pypy??) + local impl=3D"${1/_/.}" + case "${impl}" in + python?.?|jython?.?) + echo "/usr/bin/${impl}" ;; + pypy?.?) echo "TODO" ;; *) die "Unsupported implementation: ${1}" ;; @@ -92,10 +94,10 @@ _python-distutils-ng_get_binary_for_implementation() = { } =20 required_use_str=3D" || ( - python_targets_python25 python_targets_python26 python_targets_python27 - python_targets_python31 python_targets_python32 - python_targets_jython25 - python_targets_pypy17 python_targets_pypy18 )" + python_targets_python2_5 python_targets_python2_6 python_targets_python= 2_7 + python_targets_python3_1 python_targets_python3_2 + python_targets_jython2_5 + python_targets_pypy1_7 python_targets_pypy1_8 )" if [[ "${PYTHON_OPTIONAL}" =3D "yes" ]]; then IUSE+=3D"python" REQUIRED_USE+=3D" python? ( ${required_use_str} )" @@ -175,7 +177,7 @@ _python-distutils-ng_default_distutils_install() { # implementation. _python-distutils-ng_has_compileall() { case "${1}" in - python??|jython??) + python?_?|jython?_?) return 0 ;; *) return 1 ;; @@ -190,7 +192,7 @@ _python-distutils-ng_has_compileall() { # modules for given implementation. _python-distutils-ng_has_compileall_opt() { case "${1}" in - python??) + python?_?) return 0 ;; *) return 1 ;; @@ -222,7 +224,7 @@ python-distutils-ng_doscript() { # symlink to default implementation, which defaults to value of # PYTHON_DEFAULT_IMPLEMENTATION, if not specified the function will pick= default # implementation: it will the be first enabled from the following list: -# python27, python26, python25, python32, python31, pypy18, pypy17, jy= thon25 +# python2_7, python2_6, python2_5, python3_2, python3_1, pypy1_8, pypy= 1_7, jython2_5 python-distutils-ng_newscript() { [[ -n "${1}" ]] || die "Missing source file name" [[ -n "${2}" ]] || die "Missing destination file name" @@ -232,7 +234,7 @@ python-distutils-ng_newscript() { =20 if [[ -z "${default_impl}" ]]; then # TODO: Pick default implementation - for impl in python{27,26,25,32,21} pypy{18,17} jython25; do + for impl in python{2_7,2_6,2_5,3_2,2_1} pypy{1_8,1_7} jython2_5; do use "python_targets_${impl}" || continue default_impl=3D"${impl}" break; diff --git a/profiles/desc/python_targets.desc b/profiles/desc/python_tar= gets.desc index 350fa10..c0a156d 100644 --- a/profiles/desc/python_targets.desc +++ b/profiles/desc/python_targets.desc @@ -4,11 +4,11 @@ =20 # This file contains descriptions of PYTHON_TARGETS USE_EXPAND flags. =20 -python25 - Build with Python 2.5 -python26 - Build with Python 2.6 -python27 - Build with Python 2.7 -python31 - Build with Python 3.1 -python32 - Build with Python 3.2 -jython25 - Build with Jythin 2.5 -pypy17 - Build with PyPy 1.7 -pypy18 - Build with PyPy 1.8 +python2_5 - Build with Python 2.5 +python2_6 - Build with Python 2.6 +python2_7 - Build with Python 2.7 +python3_1 - Build with Python 3.1 +python3_2 - Build with Python 3.2 +jython2_5 - Build with Jython 2.5 +pypy1_7 - Build with PyPy 1.7 +pypy1_8 - Build with PyPy 1.8