diff --git a/brp-python-bytecompile b/brp-python-bytecompile index fee0048..ede435b 100755 --- a/brp-python-bytecompile +++ b/brp-python-bytecompile @@ -29,8 +29,8 @@ function python_bytecompile() local python_binary=$2 local exclude=$3 local python_libdir=$4 - local depth=$5 - local real_libdir=$6 + local depth=$5 # Not used for Python >= 3.4 + local real_libdir=$6 # Not used for Python >= 3.4 python_version=$($python_binary -c "import sys; sys.stdout.write('{0.major}{0.minor}'.format(sys.version_info))") @@ -46,7 +46,9 @@ function python_bytecompile() # -x excludes paths defined by regex # -e excludes symbolic links pointing outside the build root # -x and -e together implements the same functionality as the Filter class below - PYTHONPATH=/usr/lib/rpm/redhat/ $python_binary $options -m compileall2 -q -f $exclude -d $real_libdir -e $RPM_BUILD_ROOT $python_libdir + # -s strips $RPM_BUILD_ROOT from the path + # -p prepends the leading slash to the path to make it absolute + PYTHONPATH=/usr/lib/rpm/redhat/ $python_binary $options -m compileall2 -q -f $exclude -s $RPM_BUILD_ROOT -p / -e $RPM_BUILD_ROOT $python_libdir else # # Python 3.3 and lower (incl. Python 2) diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 7d46fc6..832f7c5 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -6,7 +6,7 @@ Summary: Red Hat specific rpm configuration files Name: redhat-rpm-config -Version: 142 +Version: 143 Release: 1%{?dist} # No version specified. License: GPL+ @@ -207,6 +207,10 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %{_rpmconfigdir}/macros.d/macros.kmp %changelog +* Tue Nov 05 2019 Lumír Balhar - 143-1 +- Fix brp-python-bytecompile with the new features from compileall2 +- Resolves: rhbz#1595265 + * Fri Nov 01 2019 Miro Hrončok - 142-1 - Fix the simple API of %%gpgverify.