[PATCH 4/4] gui: compile Python bytecode when installing Python files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Create a cache directory such as
/usr/share/system-config-selinux/__pycache__/ in order to prevent it
from being dynamically created when the gui is used.

Signed-off-by: Nicolas Iooss <nicolas.iooss@xxxxxxx>
---
 gui/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gui/Makefile b/gui/Makefile
index ca965c942912..c3fd196fcd2c 100644
--- a/gui/Makefile
+++ b/gui/Makefile
@@ -1,3 +1,5 @@
+PYTHON ?= python3
+
 # Installation directories.
 LINGUAS ?= ru
 PREFIX ?= /usr
@@ -54,6 +56,8 @@ install: all
 		install -m 644 sepolicy_$${i}.png $(DESTDIR)$(DATADIR)/icons/hicolor/$${i}x$${i}/apps/sepolicy.png; \
 	done
 	install -m 644 org.selinux.config.policy $(DESTDIR)$(DATADIR)/polkit-1/actions/
+	$(PYTHON) -m compileall $(DESTDIR)$(SHAREDIR)
+
 clean:
 
 indent:
-- 
2.23.0




[Index of Archives]     [Selinux Refpolicy]     [Linux SGX]     [Fedora Users]     [Fedora Desktop]     [Yosemite Photos]     [Yosemite Camping]     [Yosemite Campsites]     [KDE Users]     [Gnome Users]

  Powered by Linux