mgorny      14/12/27 19:31:39

  Modified:             ChangeLog python-utils-r1.eclass
  Log:
  Add die-checks for python.eclass & distutils.eclass variables.

Revision  Changes    Path
1.1478               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1478&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1478&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1477&r2=1.1478

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1477
retrieving revision 1.1478
diff -u -r1.1477 -r1.1478
--- ChangeLog   27 Dec 2014 19:00:10 -0000      1.1477
+++ ChangeLog   27 Dec 2014 19:31:39 -0000      1.1478
@@ -1,6 +1,9 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1477 2014/12/27 
19:00:10 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1478 2014/12/27 
19:31:39 mgorny Exp $
+
+  27 Dec 2014; Michał Górny <[email protected]> python-utils-r1.eclass:
+  Add die-checks for python.eclass & distutils.eclass variables.
 
   27 Dec 2014; Michał Górny <[email protected]> distutils-r1.eclass:
   Add die-replacements for distutils.eclass functions, to help finding mistakes



1.69                 eclass/python-utils-r1.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-utils-r1.eclass?rev=1.69&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-utils-r1.eclass?rev=1.69&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/python-utils-r1.eclass?r1=1.68&r2=1.69

Index: python-utils-r1.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- python-utils-r1.eclass      27 Dec 2014 18:26:21 -0000      1.68
+++ python-utils-r1.eclass      27 Dec 2014 19:31:39 -0000      1.69
@@ -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 @@
        [[ ${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.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";
 }




Reply via email to