summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2014-12-27 19:31:39 +0000
committerMichał Górny <mgorny@gentoo.org>2014-12-27 19:31:39 +0000
commit99e617b9e2fcddf0dbf32137174078a8c29aa128 (patch)
tree3b2224ea1abcb86b7e1463049220a246e8650008 /eclass/python-utils-r1.eclass
parentStable for amd64, wrt bug #530772 (diff)
downloadgentoo-2-99e617b9e2fcddf0dbf32137174078a8c29aa128.tar.gz
gentoo-2-99e617b9e2fcddf0dbf32137174078a8c29aa128.tar.bz2
gentoo-2-99e617b9e2fcddf0dbf32137174078a8c29aa128.zip
Add die-checks for python.eclass & distutils.eclass variables.
Diffstat (limited to 'eclass/python-utils-r1.eclass')
-rw-r--r--eclass/python-utils-r1.eclass33
1 files changed, 32 insertions, 1 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 173306685231..05c8e15fdeab 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.68 2014/12/27 18:26:21 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.69 2014/12/27 19:31:39 mgorny Exp $
# @ECLASS: python-utils-r1
# @MAINTAINER:
@@ -842,6 +842,8 @@ python_wrapper_setup() {
[[ ${impl} ]] || die "${FUNCNAME}: no impl nor EPYTHON specified."
if [[ ! -x ${workdir}/bin/python ]]; then
+ _python_check_dead_variables
+
mkdir -p "${workdir}"/{bin,pkgconfig} || die
# Clean up, in case we were supposed to do a cheap update.
@@ -1168,6 +1170,35 @@ python_export_utf8_locale() {
# -- python.eclass functions --
+_python_check_dead_variables() {
+ local v
+
+ for v in PYTHON_DEPEND PYTHON_USE_WITH{,_OR,_OPT} {RESTRICT,SUPPORT}_PYTHON_ABIS
+ do
+ if [[ ${!v} ]]; then
+ die "${v} is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#Ebuild_head"
+ fi
+ done
+
+ for v in PYTHON_TESTS_RESTRICTED_ABIS PYTHON_EXPORT_PHASE_FUNCTIONS \
+ PYTHON_VERSIONED_{SCRIPTS,EXECUTABLES} PYTHON_NONVERSIONED_EXECUTABLES \
+ PYTHON_TEST_VERBOSITY
+ do
+ if [[ ${!v} ]]; then
+ die "${v} is invalid for python-r1 suite"
+ fi
+ done
+
+ for v in DISTUTILS_USE_SEPARATE_SOURCE_DIRECTORIES DISTUTILS_SETUP_FILES \
+ DISTUTILS_GLOBAL_OPTIONS DISTUTILS_SRC_TEST \
+ DISTUTILS_DISABLE_TEST_DEPENDENCY
+ do
+ if [[ ${!v} ]]; then
+ die "${v} is invalid for distutils-r1"
+ fi
+ done
+}
+
python_pkg_setup() {
die "${FUNCNAME}() is invalid for python-r1 suite, please take a look @ https://wiki.gentoo.org/wiki/Project:Python/Python.eclass_conversion#pkg_setup"
}