diff --git a/libreoffice.spec b/libreoffice.spec index 56dde3b..889cc34 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -1307,10 +1307,17 @@ chrpath --delete %{buildroot}%{_libdir}/%{name}/program/librasqal-lo.so.3 %endif # Generate python cache files -%{python_type} -m compileall %{buildroot}/%{_libdir}/libreoffice/program/ -%{python_type} -m compileall %{buildroot}/%{_libdir}/libreoffice/share/extensions/ -%{python_type} -m compileall %{buildroot}/%{_libdir}/libreoffice/share/Scripts/python/ -%{python_type} -m compileall %{buildroot}/%{_libdir}/libreoffice/sdk/examples/python/ +%if 0%{?suse_version} > 1130 +%py3_compile %{buildroot}/%{_libdir}/libreoffice/program/ +%py3_compile %{buildroot}/%{_libdir}/libreoffice/share/extensions/ +%py3_compile %{buildroot}/%{_libdir}/libreoffice/share/Scripts/python/ +%py3_compile %{buildroot}/%{_libdir}/libreoffice/sdk/examples/python/ +%else +%py_compile %{buildroot}/%{_libdir}/libreoffice/program/ +%py_compile %{buildroot}/%{_libdir}/libreoffice/share/extensions/ +%py_compile %{buildroot}/%{_libdir}/libreoffice/share/Scripts/python/ +%py_compile %{buildroot}/%{_libdir}/libreoffice/sdk/examples/python/ +%endif # Move python cache to respective filelist for i in file-lists/*.txt; do