diff --git a/python39.changes b/python39.changes index 9f7a310..255a08e 100644 --- a/python39.changes +++ b/python39.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 2 16:18:29 UTC 2024 - Matej Cepl + +- Drop .pyc files from docdir for reproducible builds + ------------------------------------------------------------------- Fri Sep 20 14:57:10 UTC 2024 - Matej Cepl diff --git a/python39.spec b/python39.spec index be611af..9680400 100644 --- a/python39.spec +++ b/python39.spec @@ -801,6 +801,11 @@ 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 +# For the purposes of reproducibility, it is necessary to eliminate any *.pyc files inside documentation dirs +if [ -d %{buildroot}%{_defaultdocdir} ] ; then +find %{buildroot}%{_defaultdocdir} -type f -name \*.pyc -ls -exec rm -vf '{}' \; +fi + %if %{with general} %files -n %{python_pkg_name}-tk %{sitedir}/tkinter