diff options
author | Michał Górny <mgorny@gentoo.org> | 2012-11-24 21:07:14 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2012-11-24 21:07:14 +0000 |
commit | e11f2e880170ec409ca43860139b31979e6392ff (patch) | |
tree | 6723137aa450f44a150ca563abe18fd9ce1b9a24 /eclass/python-single-r1.eclass | |
parent | old (diff) | |
download | gentoo-2-e11f2e880170ec409ca43860139b31979e6392ff.tar.gz gentoo-2-e11f2e880170ec409ca43860139b31979e6392ff.tar.bz2 gentoo-2-e11f2e880170ec409ca43860139b31979e6392ff.zip |
Fix EAPI checks, add double- and colliding include guards.
Diffstat (limited to 'eclass/python-single-r1.eclass')
-rw-r--r-- | eclass/python-single-r1.eclass | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass index 263849b88cd8..d0f6df3c14d6 100644 --- a/eclass/python-single-r1.eclass +++ b/eclass/python-single-r1.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-single-r1.eclass,v 1.1 2012/11/24 20:53:53 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-single-r1.eclass,v 1.2 2012/11/24 21:07:14 mgorny Exp $ # @ECLASS: python-single-r1 # @MAINTAINER: @@ -30,9 +30,9 @@ # For more information, please see the python-r1 Developer's Guide: # http://www.gentoo.org/proj/en/Python/python-r1/dev-guide.xml -case "${EAPI}" in +case "${EAPI:-0}" in 0|1|2|3) - die "Unsupported EAPI=${EAPI} (too old) for ${ECLASS}" + die "Unsupported EAPI=${EAPI:-0} (too old) for ${ECLASS}" ;; 4|5) # EAPI=4 needed by python-r1 @@ -42,6 +42,8 @@ case "${EAPI}" in ;; esac +if [[ ! ${_PYTHON_SINGLE_R1} ]]; then + inherit python-r1 EXPORT_FUNCTIONS pkg_setup @@ -85,6 +87,7 @@ _python_single_set_globals python-single-r1_pkg_setup() { debug-print-function ${FUNCNAME} "${@}" + local impl for impl in "${_PYTHON_ALL_IMPLS[@]}"; do if has "${impl}" "${PYTHON_COMPAT[@]}" \ && use "python_single_target_${impl}" @@ -94,3 +97,6 @@ python-single-r1_pkg_setup() { fi done } + +_PYTHON_SINGLE_R1=1 +fi |