summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-11-04 15:16:34 +0000
committerMichał Górny <mgorny@gentoo.org>2012-11-04 15:16:34 +0000
commite4c1ded0f4fc6d6e4c4c5b662e0768305bb1d7b8 (patch)
treeaf0be97029088ce3e9d02c732820a5b5b258b457 /eclass/python-r1.eclass
parent[bump] dev-perl/Getopt-Long-Descriptive-0.93.0 (diff)
downloadgentoo-2-e4c1ded0f4fc6d6e4c4c5b662e0768305bb1d7b8.tar.gz
gentoo-2-e4c1ded0f4fc6d6e4c4c5b662e0768305bb1d7b8.tar.bz2
gentoo-2-e4c1ded0f4fc6d6e4c4c5b662e0768305bb1d7b8.zip
Always require PYTHON_COMPAT. Add an exception for python-exec which is a special case.
Diffstat (limited to 'eclass/python-r1.eclass')
-rw-r--r--eclass/python-r1.eclass13
1 files changed, 7 insertions, 6 deletions
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 7c678a55ea7e..0d6ef4c86211 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-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-r1.eclass,v 1.16 2012/11/01 21:49:34 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.17 2012/11/04 15:16:34 mgorny Exp $
# @ECLASS: python-r1
# @MAINTAINER:
@@ -50,15 +50,12 @@ _PYTHON_ALL_IMPLS=(
)
# @ECLASS-VARIABLE: PYTHON_COMPAT
+# @REQUIRED
# @DESCRIPTION:
# This variable contains a list of Python implementations the package
# supports. It must be set before the `inherit' call. It has to be
# an array.
#
-# The default is to enable all supported implementations. However, it is
-# discouraged to use that default unless in very special cases and test
-# the package with each added implementation instead.
-#
# Example:
# @CODE
# PYTHON_COMPAT=( python2_5 python2_6 python2_7 )
@@ -69,7 +66,11 @@ _PYTHON_ALL_IMPLS=(
# PYTHON_COMPAT=( python{2_5,2_6,2_7} )
# @CODE
if ! declare -p PYTHON_COMPAT &>/dev/null; then
- PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
+ if [[ ${CATEGORY}/${PN} == dev-python/python-exec ]]; then
+ PYTHON_COMPAT=( "${_PYTHON_ALL_IMPLS[@]}" )
+ else
+ die 'PYTHON_COMPAT not declared.'
+ fi
fi
# @ECLASS-VARIABLE: PYTHON_REQ_USE