brp-bytecompile_python: exclude paths listed in $RPM_PYTHON3_COMPILE_INCLUDE (ALT#28606)

$RPM_PYTHON3_COMPILE_INCLUDE is usually a subset of
$RPM_PYTHON_COMPILE_INCLUDE, so add the former to the exclude list.
This commit is contained in:
Дмитрий Левин 2013-04-06 00:49:11 +00:00
parent da9e6dfaab
commit 42eacfcc82

View File

@ -26,6 +26,9 @@ ValidateBuildRoot
cd "$RPM_BUILD_ROOT"
if [ -n "$RPM_PYTHON" -a -x "$RPM_PYTHON" ] && [ `find -type f -name \*.py |wc -l` -gt 0 ]; then
RPM_PYTHON_COMPILE_EXCLUDE="$RPM_PYTHON_COMPILE_EXCLUDE ${RPM_PYTHON3_COMPILE_INCLUDE-}"
RPM_PYTHON_COMPILE_EXCLUDE="${RPM_PYTHON_COMPILE_EXCLUDE%% }"
echo "Bytecompiling python modules in $PWD using $RPM_PYTHON"
$RPM_PYTHON @RPMCONFIGDIR@/python.compileall.py "--select=$RPM_PYTHON_COMPILE_METHOD" "--exclude=$RPM_PYTHON_COMPILE_EXCLUDE" "--include=$RPM_PYTHON_COMPILE_INCLUDE" "--deep=$RPM_PYTHON_COMPILE_DEEP" ${RPM_PYTHON_COMPILE_SKIP_X:+--skip_x} ${RPM_PYTHON_COMPILE_CLEAN:+--clean} "--prefix=$RPM_BUILD_ROOT"
echo "Bytecompiling python modules with optimization in $PWD using $RPM_PYTHON -O"