Index: python/GNUmakefile |
diff --git a/python/GNUmakefile b/python/GNUmakefile |
index 8ac60b4363aa18fe38be282a9592e4f87818cfa9..b541206df39ca35b1596867a104536727f0c79dd 100644 |
--- a/python/GNUmakefile |
+++ b/python/GNUmakefile |
@@ -2,19 +2,28 @@ depth = .. |
SUBDIRS=auxiliar |
-STEPMAKE_TEMPLATES=python-module install-out po |
+STEPMAKE_TEMPLATES=install-out po |
+ |
+PY_MODULES_IN = $(call src-wildcard,*.py) |
+OUT_PY_MODULES = $(PY_MODULES_IN:%=$(outdir)/%) |
include $(depth)/make/stepmake.make |
-# unset al guile stuff from configure |
-CONFIG_LDFLAGS= |
+$(outdir)/%.py: %.py |
+ $(call ly_progress,Making,$@,(py compile)) |
+ cp $< $@ |
+ PYTHONOPTIMIZE= $(PYTHON) -c 'import py_compile; py_compile.compile ("$@", doraise=True)' |
+ chmod 755 $@ |
+ |
+default: $(OUT_PY_MODULES) |
-INSTALLATION_OUT_DIR=$(local_lilypond_datadir)/python |
-INSTALLATION_OUT_FILES=$(OUT_PY_MODULES) |
+INSTALLATION_OUT_SUFFIXES = 1 2 |
-default: $(outdir)/relocate-preamble.py |
+INSTALLATION_OUT_DIR1=$(local_lilypond_datadir)/python |
+INSTALLATION_OUT_FILES1=$(PY_MODULES_IN) |
-$(outdir)/relocate-preamble.py: $(depth)/VERSION |
+INSTALLATION_OUT_DIR2 = $(local_lilypond_datadir)/python/__pycache__ |
+INSTALLATION_OUT_FILES2 = $(wildcard $(outdir)/__pycache__/*.pyc) |
local-test: book_base_test.py |
$(PYTHON) $< |