From 83afa8d3301eb5ce8c2ec1cdd4573f279bfb8b3de9ed8acd66f2266f2a7b6f88 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Mon, 5 Jul 2021 22:29:33 +0000 Subject: [PATCH] - compile even when older python-rpm-macros don't have the python_compileall macro OBS-URL: https://build.opensuse.org/package/show/KDE:Qt:PyQt/python-sip4?expand=0&rev=2 --- python-sip4.changes | 6 ++++++ python-sip4.spec | 2 ++ 2 files changed, 8 insertions(+) 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