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 1QuMAQ-0000gy-3b for garchives@archives.gentoo.org; Fri, 19 Aug 2011 10:19:10 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03A4E21C07C; Fri, 19 Aug 2011 10:19:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AD60821C07C for ; Fri, 19 Aug 2011 10:19:01 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 02F221B4086 for ; Fri, 19 Aug 2011 10:19:01 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2257) id ACCBD2004C; Fri, 19 Aug 2011 10:18:59 +0000 (UTC) From: "Fabio Erculiani (lxnay)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, lxnay@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in eclass: python.eclass X-VCS-Repository: gentoo-x86 X-VCS-Files: python.eclass X-VCS-Directories: eclass X-VCS-Committer: lxnay X-VCS-Committer-Name: Fabio Erculiani Content-Type: text/plain; charset=utf8 Message-Id: <20110819101859.ACCBD2004C@flycatcher.gentoo.org> Date: Fri, 19 Aug 2011 10:18:59 +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: X-Archives-Hash: 00b06459d04ed3ab2398f4b525c10186 lxnay 11/08/19 10:18:59 Modified: python.eclass Log: restore USE deps check for EAPI=3D0,1 in pkg_setup Revision Changes Path 1.129 eclass/python.eclass file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python.ecla= ss?rev=3D1.129&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python.ecla= ss?rev=3D1.129&content-type=3Dtext/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python.ecla= ss?r1=3D1.128&r2=3D1.129 Index: python.eclass =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /var/cvsroot/gentoo-x86/eclass/python.eclass,v retrieving revision 1.128 retrieving revision 1.129 diff -u -r1.128 -r1.129 --- python.eclass 19 Aug 2011 10:10:03 -0000 1.128 +++ python.eclass 19 Aug 2011 10:18:59 -0000 1.129 @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.128 2011/08/= 19 10:10:03 lxnay Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.129 2011/08/= 19 10:18:59 lxnay Exp $ =20 # @ECLASS: python.eclass # @MAINTAINER: @@ -400,7 +400,8 @@ # @DESCRIPTION: # Perform sanity checks and initialize environment. # -# This function is exported in EAPI 2 and 3. Calling of this function is= mandatory in EAPI >=3D4. +# This function is exported in EAPI 2 and 3 when PYTHON_USE_WITH or PYTH= ON_USE_WITH_OR variable +# is set and always in EAPI >=3D4. Calling of this function is mandatory= in EAPI >=3D4. python_pkg_setup() { if [[ "${EBUILD_PHASE}" !=3D "setup" ]]; then die "${FUNCNAME}() can be used only in pkg_setup() phase" @@ -420,6 +421,47 @@ PYTHON_ABI=3D"${PYTHON_ABI:-$(PYTHON --ABI)}" fi =20 + if has "${EAPI:-0}" 0 1 && [[ -n "${PYTHON_USE_WITH}" || -n "${PYTHON_U= SE_WITH_OR}" ]]; then + if [[ "${PYTHON_USE_WITH_OPT}" ]]; then + if [[ "${PYTHON_USE_WITH_OPT}" =3D=3D !* ]]; then + use ${PYTHON_USE_WITH_OPT#!} && return + else + use !${PYTHON_USE_WITH_OPT} && return + fi + fi + + python_pkg_setup_check_USE_flags() { + local python_atom USE_flag + python_atom=3D"$(python_get_implementational_package)" + + for USE_flag in ${PYTHON_USE_WITH}; do + if ! has_version "${python_atom}[${USE_flag}]"; then + eerror "Please rebuild ${python_atom} with the following USE flags = enabled: ${PYTHON_USE_WITH}" + die "Please rebuild ${python_atom} with the following USE flags ena= bled: ${PYTHON_USE_WITH}" + fi + done + + for USE_flag in ${PYTHON_USE_WITH_OR}; do + if has_version "${python_atom}[${USE_flag}]"; then + return + fi + done + + if [[ ${PYTHON_USE_WITH_OR} ]]; then + eerror "Please rebuild ${python_atom} with at least one of the follo= wing USE flags enabled: ${PYTHON_USE_WITH_OR}" + die "Please rebuild ${python_atom} with at least one of the followin= g USE flags enabled: ${PYTHON_USE_WITH_OR}" + fi + } + + if _python_package_supporting_installation_for_multiple_python_abis; t= hen + PYTHON_SKIP_SANITY_CHECKS=3D"1" python_execute_function -q python_pkg= _setup_check_USE_flags + else + python_pkg_setup_check_USE_flags + fi + + unset -f python_pkg_setup_check_USE_flags + fi + PYTHON_PKG_SETUP_EXECUTED=3D"1" } =20