dev-python/pypy-exe: Fix interpreter choice conditional
authorMichał Górny <mgorny@gentoo.org>
Sat, 4 Jan 2020 14:59:15 +0000 (15:59 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sat, 4 Jan 2020 15:01:48 +0000 (16:01 +0100)
Closes: https://bugs.gentoo.org/704756
Signed-off-by: Michał Górny <mgorny@gentoo.org>
dev-python/pypy-exe/pypy-exe-7.3.0.ebuild

index 0b1e0997bb9166b119687dbefb938534e2928239..720c1dc86a962abb00532c2c448c02fa51cf84d3 100644 (file)
@@ -70,20 +70,18 @@ pkg_setup() {
        if [[ ${MERGE_TYPE} != binary ]]; then
                check_env
 
-               if has_version -b dev-python/pypy ||
-                               has_version -b dev-python/pypy-bin
+               use low-memory && local EPYTHON=
+               if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] &&
+                               { has_version -b dev-python/pypy ||
+                               has_version -b dev-python/pypy-bin; }
                then
-                       if [[ ! ${EPYTHON} || ${EPYTHON} == pypy ]] ||
-                                       use low-memory
-                       then
-                               einfo "Using already-installed PyPy to perform the translation."
-                               EPYTHON=pypy
-                       else
-                               einfo "Using ${EPYTHON} to perform the translation. Please note that upstream"
-                               einfo "recommends using PyPy for that. If you wish to do so, please unset"
-                               einfo "the EPYTHON variable."
-                               python-any-r1_pkg_setup
-                       fi
+                       einfo "Using already-installed PyPy to perform the translation."
+                       EPYTHON=pypy
+               else
+                       einfo "Using ${EPYTHON} to perform the translation. Please note that upstream"
+                       einfo "recommends using PyPy for that. If you wish to do so, please unset"
+                       einfo "the EPYTHON variable."
+                       python-any-r1_pkg_setup
                fi
        fi
 }