python-utils-r1.eclass: Reduce python_do*/new* ban to EAPI < 4
authorMichał Górny <mgorny@gentoo.org>
Sun, 29 Nov 2015 08:16:59 +0000 (09:16 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sun, 29 Nov 2015 08:19:16 +0000 (09:19 +0100)
Fix python_do* and python_new* helper ban to EAPIs older than 4. That
was the original intent, and restricting it to 5+ breaks old
dev-lang/python ebuilds.

eclass/python-utils-r1.eclass

index 13e9d38c4ec285a68c05f38b9799f8eaddb57223..3dfac9ed0082178de0b9c9b15ad7d903b8f494e2 100644 (file)
@@ -666,8 +666,8 @@ python_newexe() {
 
        [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
        [[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <path> <new-name>"
-       if [[ ${EAPI:-0} == [01234] ]]; then
-               die "python_do* and python_new* helpers are banned in EAPIs older than 5."
+       if [[ ${EAPI:-0} == [0123] ]]; then
+               die "python_do* and python_new* helpers are banned in EAPIs older than 4."
        fi
 
        local wrapd=${python_scriptroot:-${DESTTREE}/bin}
@@ -796,8 +796,8 @@ python_domodule() {
        debug-print-function ${FUNCNAME} "${@}"
 
        [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
-       if [[ ${EAPI:-0} == [01234] ]]; then
-               die "python_do* and python_new* helpers are banned in EAPIs older than 5."
+       if [[ ${EAPI:-0} == [0123] ]]; then
+               die "python_do* and python_new* helpers are banned in EAPIs older than 4."
        fi
 
        local d
@@ -837,8 +837,8 @@ python_doheader() {
        debug-print-function ${FUNCNAME} "${@}"
 
        [[ ${EPYTHON} ]] || die 'No Python implementation set (EPYTHON is null).'
-       if [[ ${EAPI:-0} == [01234] ]]; then
-               die "python_do* and python_new* helpers are banned in EAPIs older than 5."
+       if [[ ${EAPI:-0} == [0123] ]]; then
+               die "python_do* and python_new* helpers are banned in EAPIs older than 4."
        fi
 
        local d PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR}