04-create-xbps-medatada-scripts.sh: autogenerate pycompile_modules

This commit is contained in:
Piotr Wójcik 2019-12-02 20:40:19 +01:00 committed by Piotr
parent 94c2318423
commit 0139bdb524
2 changed files with 7 additions and 3 deletions

View file

@ -260,6 +260,9 @@ _EOF
#
if [ -d ${PKGDESTDIR}/usr/lib/python* ]; then
pycompile_version="$(find ${PKGDESTDIR}/usr/lib/python* -prune -type d | grep -o '[[:digit:]]\.[[:digit:]]$')"
if [ -z "${pycompile_module}" ]; then
pycompile_module="$(find ${PKGDESTDIR}/usr/lib/python*/site-packages -mindepth 1 -maxdepth 1 '!' -name '*.egg-info' '!' -name '*.dist-info' '!' -name '*.so' '!' -name '*.pth' -printf '%f ')"
fi
fi
if [ -n "${pycompile_dirs}" -o -n "${pycompile_module}" ]; then