mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
py-xxx.mk: Introduce PYTHON_MAJOR
Where *.pyc files are created is decided by PYTHON_MAJOR, not PYTHON_VERSION, so introduce it. Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
15f39de08f
commit
a82fa9023b
2 changed files with 5 additions and 4 deletions
|
|
@ -15,14 +15,14 @@ install-reg.done: install-dirs.done $(PY_INSTALLED_REG)
|
|||
$(PY_INSTALL_DIR_PY)/%.py: %.py
|
||||
$(INSTALL) -p -m $(PYMODMODE) -o $(PYMODOWNER) -g $(PYMODGROUP) $< $@
|
||||
|
||||
ifneq ($(PYTHON_VERSION),3)
|
||||
ifneq ($(PYTHON_MAJOR),3)
|
||||
%.pyc: %.py
|
||||
else
|
||||
__pycache__/%.$(PY_CPYTHON_PREFIX).pyc: %.py
|
||||
endif
|
||||
$(PYTHON) -c "import py_compile; py_compile.compile(\"$<\", doraise=True)"
|
||||
|
||||
ifeq ($(PYTHON_VERSION),3)
|
||||
ifeq ($(PYTHON_MAJOR),3)
|
||||
$(PY_INSTALL_DIR_PY)/__pycache__/%.$(PY_CPYTHON_PREFIX).pyc: __pycache__/%.$(PY_CPYTHON_PREFIX).pyc
|
||||
else
|
||||
$(PY_INSTALL_DIR_PY)/%.pyc: %.pyc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue