distutils-r1.eclass: Fix pypy prefix check for new paths
authorMichał Górny <mgorny@gentoo.org>
Sat, 16 Feb 2019 13:11:35 +0000 (14:11 +0100)
committerMichał Górny <mgorny@gentoo.org>
Sat, 16 Feb 2019 13:12:18 +0000 (14:12 +0100)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
eclass/distutils-r1.eclass

index fa7a3ab5c12b0bfb63a5b33d233c8649e1aa2207..66920d1f7553355b8c8f8e7c44fb2a5fc31611d3 100644 (file)
@@ -597,7 +597,16 @@ distutils-r1_python_install() {
                        die "Package installs '${p}' package which is forbidden and likely a bug in the build system."
                fi
        done
-       if [[ -d ${root}/usr/$(get_libdir)/pypy/share ]]; then
+
+       local shopt_save=$(shopt -p nullglob)
+       shopt -s nullglob
+       local pypy_dirs=(
+               "${root}/usr/$(get_libdir)"/pypy*/share
+               "${root}/usr/lib"/pypy*/share
+       )
+       ${shopt_save}
+
+       if [[ -n ${pypy_dirs} ]]; then
                local cmd=die
                [[ ${EAPI} == [45] ]] && cmd=eqawarn
                "${cmd}" "Package installs 'share' in PyPy prefix, see bug #465546."