Drop .pyc files from docdir for reproducible builds

without this change, 2 files varied between builds:
/usr/share/doc/packages/python312-core/Tools/build/__pycache__/generate_global_objects.cpython-312.pyc
/usr/share/doc/packages/python312-core/Tools/build/__pycache__/umarshal.cpython-312.pyc

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python312?expand=0&rev=69
This commit is contained in:
Matej Cepl 2024-09-30 16:48:11 +00:00 committed by Git OBS Bridge
parent c75ef22ae5
commit a00145be7f
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Sep 30 09:42:13 UTC 2024 - Bernhard Wiedemann <bwiedemann@suse.com>
- Drop .pyc files from docdir for reproducible builds
-------------------------------------------------------------------
Fri Sep 13 17:09:37 UTC 2024 - Matej Cepl <mcepl@cepl.eu>

View File

@ -796,6 +796,7 @@ LD_LIBRARY_PATH=. ./python -O -c "from py_compile import compile; compile('$FAIL
)
echo %{sitedir}/_import_failed > %{buildroot}/%{sitedir}/site-packages/zzzz-import-failed-hooks.pth
%endif
find %{buildroot}%{_docdir}/%{name} -type f -name \*.pyc -delete ||:
%if %{with general}
%files -n %{python_pkg_name}-tk