From 829d3b3f71e7ac44b480b62cb6084118268ad0e2 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Mon, 16 Jul 2018 13:24:29 +0200 Subject: [PATCH] Disable automatic compilation of Python files in extra directories https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/IDDR65FMKZYZYLL6DGFEKFACC55PELW3/ https://fedoraproject.org/wiki/Packaging:Python_Appendix#Manual_byte_compilation --- setroubleshoot-plugins.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setroubleshoot-plugins.spec b/setroubleshoot-plugins.spec index c60d4bc..1f36a6b 100644 --- a/setroubleshoot-plugins.spec +++ b/setroubleshoot-plugins.spec @@ -1,5 +1,8 @@ %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} +# Disable automatic compilation of Python files in extra directories +%global _python_bytecompile_extra 0 + Summary: Analysis plugins for use with setroubleshoot Name: setroubleshoot-plugins Version: 3.3.9 @@ -36,6 +39,9 @@ make PYTHON=%{__python3} rm -rf %{buildroot} make DESTDIR=%{buildroot} PYTHON=%{__python3} pkgdocdir=%{_pkgdocdir} install %find_lang %{name} +# Manually invoke the python byte compile macro for each path that needs byte +# compilation. +%py_byte_compile %{__python3} %{buildroot}%{_datadir}/setroubleshoot/plugins %clean rm -rf %{buildroot}