diff --git a/python-sip4.changes b/python-sip4.changes index be924e2..0745308 100644 --- a/python-sip4.changes +++ b/python-sip4.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 5 22:28:42 UTC 2021 - Ben Greiner + +- compile even when older python-rpm-macros don't have the + python_compileall macro + ------------------------------------------------------------------- Sat Feb 27 11:03:17 UTC 2021 - Benjamin Greiner diff --git a/python-sip4.spec b/python-sip4.spec index 4914d18..20bb547 100644 --- a/python-sip4.spec +++ b/python-sip4.spec @@ -238,6 +238,8 @@ grep '%%requires_%{python3_prefix}_sip_api' %{buildroot}%{_rpmconfigdir}/macros echo "%%requires_%{python3_prefix}_sip_api Requires: %{python_prefix}-sip(api) = %%python_sip_api_ver" >> %{buildroot}%{_rpmconfigdir}/macros.d/macros.python_all-sip4 %endif %{?python_compileall} +%{?!python_compileall:%python_exec -m compileall %{buildroot}%{$python_sitearch}} +%{?!python_compileall:%python_exec -O -m compileall %{buildroot}%{$python_sitearch}} %python_clone -a %{buildroot}/%{_bindir}/sip %python_expand %fdupes %{buildroot}%{$python_sitearch} mkdir -p %{buildroot}%{_datadir}/sip