diff options
author | Mike Gilbert <floppym@gentoo.org> | 2012-01-01 05:02:27 +0000 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2012-01-01 05:02:27 +0000 |
commit | 91f001ed7b028788dde70a6d0573c6c9d3da0c51 (patch) | |
tree | 3e1c8652dee109fb95549f702d4166ae5120a1a8 /eclass | |
parent | Version bump. (diff) | |
download | historical-91f001ed7b028788dde70a6d0573c6c9d3da0c51.tar.gz historical-91f001ed7b028788dde70a6d0573c6c9d3da0c51.tar.bz2 historical-91f001ed7b028788dde70a6d0573c6c9d3da0c51.zip |
Avoid including python.eclass more than once.
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/ChangeLog | 8 | ||||
-rw-r--r-- | eclass/distutils.eclass | 10 | ||||
-rw-r--r-- | eclass/python.eclass | 24 |
3 files changed, 30 insertions, 12 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index b170df5b9383..566dd1df23f0 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for eclass directory -# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.65 2011/12/31 00:46:04 pesa Exp $ +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.66 2012/01/01 05:02:27 floppym Exp $ + + 01 Jan 2012; Mike Gilbert <floppym@gentoo.org> distutils.eclass, + python.eclass: + Avoid including python.eclass more than once. 31 Dec 2011; Davide Pesavento <pesa@gentoo.org> qt4-build.eclass: Respect {C,CXX,LD}FLAGS during config.tests (bug #336618). diff --git a/eclass/distutils.eclass b/eclass/distutils.eclass index cc6130aa901d..2b4e1c21ff62 100644 --- a/eclass/distutils.eclass +++ b/eclass/distutils.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.80 2011/04/12 18:49:03 arfrever Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/distutils.eclass,v 1.81 2012/01/01 05:02:27 floppym Exp $ # @ECLASS: distutils.eclass # @MAINTAINER: @@ -9,7 +9,11 @@ # @DESCRIPTION: # The distutils eclass defines phase functions for packages with build systems using Distutils. -inherit multilib python +if [[ -z "${_PYTHON_ECLASS_INHERITED}" ]]; then + inherit python +fi + +inherit multilib case "${EAPI:-0}" in 0|1) diff --git a/eclass/python.eclass b/eclass/python.eclass index 7cd241f09964..a0a562f04a6a 100644 --- a/eclass/python.eclass +++ b/eclass/python.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2011 Gentoo Foundation +# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.143 2011/12/19 01:29:57 robbat2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python.eclass,v 1.144 2012/01/01 05:02:27 floppym Exp $ # @ECLASS: python.eclass # @MAINTAINER: @@ -9,7 +9,19 @@ # @DESCRIPTION: # The python eclass contains miscellaneous, useful functions for Python packages. -inherit multilib +# Must call inherit before EXPORT_FUNCTIONS to avoid QA warning. +if [[ -z "${_PYTHON_ECLASS_INHERITED}" ]]; then + inherit multilib +fi + +# Export pkg_setup every time to avoid issues with eclass inheritance order. +if ! has "${EAPI:-0}" 0 1 2 3 || { has "${EAPI:-0}" 2 3 && [[ -n "${PYTHON_USE_WITH}" || -n "${PYTHON_USE_WITH_OR}" ]]; }; then + EXPORT_FUNCTIONS pkg_setup +fi + +# Avoid processing this eclass more than once. +if [[ -z "${_PYTHON_ECLASS_INHERITED}" ]]; then +_PYTHON_ECLASS_INHERITED="1" if ! has "${EAPI:-0}" 0 1 2 3 4; then die "API of python.eclass in EAPI=\"${EAPI}\" not established" @@ -463,10 +475,6 @@ python_pkg_setup() { PYTHON_PKG_SETUP_EXECUTED="1" } -if ! has "${EAPI:-0}" 0 1 2 3 || { has "${EAPI:-0}" 2 3 && [[ -n "${PYTHON_USE_WITH}" || -n "${PYTHON_USE_WITH_OR}" ]]; }; then - EXPORT_FUNCTIONS pkg_setup -fi - _PYTHON_SHEBANG_BASE_PART_REGEX='^#![[:space:]]*([^[:space:]]*/usr/bin/env[[:space:]]+)?([^[:space:]]*/)?(jython|pypy-c|python)' # @FUNCTION: python_convert_shebangs @@ -3114,3 +3122,5 @@ python_mod_cleanup() { # ================================================================================================ # ===================================== DEPRECATED FUNCTIONS ===================================== # ================================================================================================ + +fi # _PYTHON_ECLASS_INHERITED |