Deprecate EAPI=4 support.
authorMichał Górny <mgorny@gentoo.org>
Thu, 19 Feb 2015 18:52:06 +0000 (18:52 +0000)
committerMichał Górny <mgorny@gentoo.org>
Thu, 19 Feb 2015 18:52:06 +0000 (18:52 +0000)
eclass/ChangeLog
eclass/python-r1.eclass
eclass/python-single-r1.eclass
eclass/python-utils-r1.eclass

index a75c2eaef793b784111c0ac2df2d0e76603edf36..d204e233951d8ca95675b2cc633a6b9fa0d6f9b9 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1540 2015/02/19 17:22:25 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1541 2015/02/19 18:52:06 mgorny Exp $
+
+  19 Feb 2015; Michał Górny <mgorny@gentoo.org> python-r1.eclass,
+  python-single-r1.eclass, python-utils-r1.eclass:
+  Deprecate EAPI=4 support.
 
   19 Feb 2015; Michał Górny <mgorny@gentoo.org> distutils-r1.eclass,
   python-r1.eclass, python-single-r1.eclass, python-utils-r1.eclass:
index fc1f7908f0a4266d6cd34f2867ee6f21eb76c04b..2ce3aa01105850bb2606e74e7718f76be8008ddb 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.85 2015/02/19 17:22:25 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-r1.eclass,v 1.86 2015/02/19 18:52:06 mgorny Exp $
 
 # @ECLASS: python-r1
 # @MAINTAINER:
@@ -652,6 +652,7 @@ _python_obtain_impls() {
 
        _python_validate_useflags
        _python_check_USE_PYTHON
+       _python_check_EAPI
 
        MULTIBUILD_VARIANTS=()
 
index d954323a660e21b7f412d761b57bef903b081992..d88fecc8849e5465d4dc77e009f8e6c6f89ac7d5 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 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.32 2015/02/19 17:22:25 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-single-r1.eclass,v 1.33 2015/02/19 18:52:06 mgorny Exp $
 
 # @ECLASS: python-single-r1
 # @MAINTAINER:
@@ -379,6 +379,8 @@ python_gen_cond_dep() {
 python_setup() {
        debug-print-function ${FUNCNAME} "${@}"
 
+       _python_check_EAPI
+
        unset EPYTHON
 
        local impl impls=()
index e601720e0674dd8d7a68b59e09709f0e7f54b6f0..1dd367a0458863816836b93cc25aa6f7f4023020 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2015 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.76 2015/02/19 17:22:25 mgorny Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/python-utils-r1.eclass,v 1.77 2015/02/19 18:52:06 mgorny Exp $
 
 # @ECLASS: python-utils-r1
 # @MAINTAINER:
@@ -1127,6 +1127,22 @@ python_export_utf8_locale() {
        return 0
 }
 
+# @FUNCTION: _python_check_EAPI
+# @INTERNAL
+# @DESCRIPTION:
+# Check whether the ebuild is not using deprecated EAPI 4. Output
+# a QA warning if it does.
+_python_check_EAPI() {
+       if [[ ${EAPI} == 4 && ! ${_PYTHON_WARNED_EAPI} ]]; then
+               eqawarn "This package is using still using EAPI=4. This results in package"
+               eqawarn "dependencies violating PMS and causing issues for package managers."
+               eqawarn "For this reason, using EAPI=4 in new Python packages will be banned"
+               eqawarn "on 2015-03-20 (2 years and 6 months after approving EAPI 5)."
+
+               _PYTHON_WARNED_EAPI=1
+       fi
+}
+
 # -- python.eclass functions --
 
 _python_check_dead_variables() {