From 8e78eabd5c27082ee05835f50feb3877c27020f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20W=C3=B3jcik?= Date: Tue, 8 Oct 2019 21:16:10 +0200 Subject: [PATCH] 04-create-xbps-medatada-scripts.sh: autogenerate pycompile_modules --- common/hooks/post-install/04-create-xbps-metadata-scripts.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/hooks/post-install/04-create-xbps-metadata-scripts.sh b/common/hooks/post-install/04-create-xbps-metadata-scripts.sh index d2a89f66679..8b015e10e09 100644 --- a/common/hooks/post-install/04-create-xbps-metadata-scripts.sh +++ b/common/hooks/post-install/04-create-xbps-metadata-scripts.sh @@ -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 | grep -Eo '[^/]+$' | grep -v -e egg-info -e dist-info -e '.so$' | tr '\n' ' ')" + fi fi if [ -n "${pycompile_dirs}" -o -n "${pycompile_module}" ]; then