py-mod.mk: Make python compilation errors fatal

Pass doraise=True to py_compile.compile()

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2019-06-04 10:38:07 +00:00
commit c67ce9fa1b

View file

@ -34,7 +34,7 @@ ifneq ($(PYTHON_VERSION),3)
else
__pycache__/%.cpython-37.pyc: %.py
endif
$(PYTHON) -c "import py_compile; py_compile.compile(\"$<\")"
$(PYTHON) -c "import py_compile; py_compile.compile(\"$<\", doraise=True)"
ifeq ($(PYTHON),python3)
$(PY_INSTALL_DIR_PY)/__pycache__/%.cpython-37.pyc: __pycache__/%.cpython-37.pyc