]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Added a function to automatically byte-compile the python files after installation.
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 14 Jul 2008 12:40:29 +0000 (12:40 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 14 Jul 2008 12:40:29 +0000 (12:40 +0000)
lfs/Config
src/scripts/py-compile [moved from src/pomona/py-compile with 100% similarity]

index ee0ed84a48ab4b04e13cc3ad1ea50f510f12265b..3bd5a42ffa344c799e10115e6203b1cb34f8b691 100644 (file)
@@ -186,6 +186,16 @@ define LOAD
                python $(DIR_TOOLS)/downloader $(URL_IPFIRE)/$@
 endef
 
+ifeq "$(STAGE)" "installer"
+define PYTHON_COMPILE
+       find $(INSTALLER_DIR)/usr/lib/python*/ -name *.py | xargs /usr/local/bin/py-compile
+endef
+else
+define PYTHON_COMPILE
+       find /usr/lib/python*/ -name *.py | xargs /usr/local/bin/py-compile
+endef
+endif
+
 define PAK
        # Bringing the files to their right place.
        @rm -rf /install/packages/package
similarity index 100%
rename from src/pomona/py-compile
rename to src/scripts/py-compile