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 A461E1381F3 for ; Mon, 22 Jul 2013 09:51:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 01487E0A9A; Mon, 22 Jul 2013 09:51:18 +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 98CEAE0A9A for ; Mon, 22 Jul 2013 09:51:17 +0000 (UTC) Received: from pomiot.lan (213-238-102-188.adsl.inetia.pl [213.238.102.188]) (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 C4B2F33E8F0; Mon, 22 Jul 2013 09:51:15 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-python@lists.gentoo.org Cc: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-python] [PATCH 3/6] [python-utils-r1] Reorder PYTHON_PKG_DEP gen. Date: Mon, 22 Jul 2013 11:51:16 +0200 Message-Id: <1374486679-15887-3-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <20130722114917.4f8d4b9a@gentoo.org> References: <20130722114917.4f8d4b9a@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: 74e1ef3c-666d-44a1-bbd5-13b5f9d7a2d2 X-Archives-Hash: 0e4378a74c0d99e1d281b2472c118625 Prepare the suffix first, and append it to individual deps. This will make adding pypy-bin a piece of cake. --- gx86/eclass/python-utils-r1.eclass | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/gx86/eclass/python-utils-r1.eclass b/gx86/eclass/python-utils-r1.eclass index 3565879..4450618 100644 --- a/gx86/eclass/python-utils-r1.eclass +++ b/gx86/eclass/python-utils-r1.eclass @@ -336,26 +336,27 @@ python_export() { debug-print "${FUNCNAME}: PYTHON_LIBS = ${PYTHON_LIBS}" ;; PYTHON_PKG_DEP) - local d + local suffix + + # slot + suffix=:${impl##*[a-z-]} + + # use-dep + if [[ ${PYTHON_REQ_USE} ]]; then + suffix+="[${PYTHON_REQ_USE}]" + fi + case ${impl} in python*) - PYTHON_PKG_DEP='dev-lang/python';; + PYTHON_PKG_DEP="dev-lang/python${suffix}";; jython*) - PYTHON_PKG_DEP='dev-java/jython';; + PYTHON_PKG_DEP="dev-java/jython${suffix}";; pypy*) - PYTHON_PKG_DEP='dev-python/pypy';; + PYTHON_PKG_DEP="dev-python/pypy${suffix}";; *) die "Invalid implementation: ${impl}" esac - # slot - PYTHON_PKG_DEP+=:${impl##*[a-z-]} - - # use-dep - if [[ ${PYTHON_REQ_USE} ]]; then - PYTHON_PKG_DEP+=[${PYTHON_REQ_USE}] - fi - export PYTHON_PKG_DEP debug-print "${FUNCNAME}: PYTHON_PKG_DEP = ${PYTHON_PKG_DEP}" ;; -- 1.8.3.2