Accepting request 754705 from home:bmwiedemann:branches:devel:openSUSE:Factory:rpmlint

Sort file list to build .pyc files reproducibly

Could it also use %py3_compile -O  to simplify?

OBS-URL: https://build.opensuse.org/request/show/754705
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint-mini?expand=0&rev=108
This commit is contained in:
Johannes Segitz 2019-12-10 07:39:44 +00:00 committed by Git OBS Bridge
parent 787b57dc5a
commit c163ecaeee
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Dec 6 15:42:19 UTC 2019 - Bernhard Wiedemann <bwiedemann@suse.com>
- Sort file list to build .pyc files reproducibly
-------------------------------------------------------------------
Tue Nov 19 12:36:58 UTC 2019 - matthias.gerstner@suse.com

View File

@ -100,7 +100,10 @@ PYTHONOPTIMIZE=1 python3 -O -m compileall -b *.py
rm *.py
popd
pushd %{buildroot}/opt/testing/%{_lib}/python%{py3_ver}/
PYTHONOPTIMIZE=1 find -name \*.py -exec python3 -O -m compileall -b {} \; -delete
for f in `find -name \*.py | sort` ; do
PYTHONOPTIMIZE=1 python3 -O -m compileall -b $f
rm $f
done
popd
find %{buildroot}/opt/testing/ -name __pycache__ -print -exec rm -Rf {} +
rm -rf %{buildroot}/{usr,etc}