Add target py-path to py-path.mk. It's mostly there for documentation purposes, giving people and machines a defined, easily accessible and omni-present way to determine how Python imports should be resolved. Signed-off-by: Jan Lindemann <jan@janware.com>
17 lines
569 B
Makefile
17 lines
569 B
Makefile
# -- PYTHONPATH
|
|
PYTHONPATH_ENV := $(PYTHONPATH)
|
|
ifeq ($(origin JW_PKG_PYTHON_PATH),undefined)
|
|
JW_PKG_PYTHON_PATH := $(shell $(JW_PKG_PY) --topdir-format absolute projects pythonpath --delimiter ' ' $(PROJECT) $(PREREQ_RUN))
|
|
endif
|
|
export PYTHONPATH := $(subst $(space),:,$(JW_PKG_PYTHON_PATH))
|
|
export MYPYPATH := $(PYTHONPATH)
|
|
|
|
all:
|
|
|
|
clean: py-tools.clean
|
|
py-tools.clean:
|
|
$(RM) -rf $(wildcard *.pyc) __pycache__ .mypy_cache .ruff_cache .pytest_cache
|
|
|
|
py-path:
|
|
@echo "PYTHONPATH=$(PYTHONPATH)"
|
|
@#echo "MYPYPATH=$(MYPYPATH)"
|