From a27bc6cc242e90f5daeaf6ee344d29c7192f97a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sun, 29 Nov 2020 17:44:37 +0100 Subject: [PATCH] BRP Python Bytecompile: Also detect Python files in /app/lib/pythonX.Y This is needed for flatpaks. Alternatively, we could pass %{_prefix} as an argument to this script, but that could make things a tad more complicated. This solution is less general, but more pragmatic. See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/4FBBB3C5E63VDNGUJRLLW27LPZ74SEJH/ --- brp-python-bytecompile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brp-python-bytecompile b/brp-python-bytecompile index fbbd02b..012e8b5 100755 --- a/brp-python-bytecompile +++ b/brp-python-bytecompile @@ -119,7 +119,7 @@ fi export PYTHONHASHSEED=0 shopt -s nullglob -for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E "/usr/lib(64)?/python[0-9]\.[0-9]+$"`; +for python_libdir in `find "$RPM_BUILD_ROOT" -type d|grep -E "/(usr|app)/lib(64)?/python[0-9]\.[0-9]+$"`; do python_binary=/usr/bin/$(basename $python_libdir) real_libdir=${python_libdir/$RPM_BUILD_ROOT/}