diff --git a/python3.9.spec b/python3.9.spec index f4488ac..b877dc0 100644 --- a/python3.9.spec +++ b/python3.9.spec @@ -17,7 +17,7 @@ URL: https://www.python.org/ %global prerel b4 %global upstream_version %{general_version}%{?prerel} Version: %{general_version}%{?prerel:~%{prerel}} -Release: 1%{?dist} +Release: 2%{?dist} License: Python @@ -1014,6 +1014,13 @@ ln -s ./python3-debug %{buildroot}%{_bindir}/python-debug %endif %endif +# Remove large, autogenerated sources and keep only the non-optimized pycache +for file in %{buildroot}%{pylibdir}/pydoc_data/topics.py $(grep --include='*.py' -lr %{buildroot}%{pylibdir}/encodings -e 'Python Character Mapping Codec .* from .* with gencodec.py'); do + directory=$(dirname ${file}) + module=$(basename ${file%%.py}) + mv ${directory}/{__pycache__/${module}.cpython-%{pyshortver}.pyc,${module}.pyc} + rm ${directory}/{__pycache__/${module}.cpython-%{pyshortver}.opt-?.pyc,${module}.py} +done # ====================================================== # Checks for packaging issues @@ -1595,6 +1602,9 @@ CheckPython optimized # ====================================================== %changelog +* Thu Jul 16 2020 Marcel Plch - 3.9.0~b4-2 +- Remove large, autogenerated Python sources and redundant pycache levels to reduce filesystem footprint + * Sat Jul 04 2020 Tomas Hrnciar - 3.9.0~b4-1 - Update to 3.9.0b4