From abc46d7d865dd772c5e5ddc4567bd1d6371a5211 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Thu, 29 Dec 2022 17:29:11 +0100 Subject: [PATCH] Compile .py files --- librevenge.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/librevenge.spec b/librevenge.spec index 2b6cac0..9e7bec4 100644 --- a/librevenge.spec +++ b/librevenge.spec @@ -15,6 +15,7 @@ BuildRequires: doxygen BuildRequires: gcc-c++ BuildRequires: pkgconfig(cppunit) BuildRequires: pkgconfig(zlib) +BuildRequires: python3-devel BuildRequires: make %description @@ -69,10 +70,13 @@ sed -i \ %install %make_install + rm -f %{buildroot}/%{_libdir}/*.la # we install API docs directly from build rm -rf %{buildroot}/%{_docdir}/%{name} +%py_byte_compile %{python3} %{buildroot}%{_datadir} + %ldconfig_scriptlets %check @@ -104,6 +108,7 @@ export LD_LIBRARY_PATH=%{buildroot}%{_libdir}${LD_LIBRARY_PATH:+:${LD_LIBRARY_PA %files gdb %{_datadir}/gdb/auto-load%{_libdir}/%{name}-%{apiversion}-gdb.py* %{_datadir}/gdb/auto-load%{_libdir}/%{name}-stream-%{apiversion}-gdb.py* +%{_datadir}/gdb/auto-load%{_libdir}/__pycache__ %dir %{_datadir}/%{name} %{_datadir}/%{name}/python %endif