Improve CmdPythonpath / mypy_path generation #10
1 changed files with 2 additions and 2 deletions
py-topdir.mk: Use pythonpath --prefix for mypy_path
Make use of the newly introduced --prefix option to the pythonpath command, and generate what's subseqently used to fill in mypy_path in pyproject.toml.
By decoupling it from PYTHONPATH, this commit makes the creation of mypy_path less involved and easier to understand. It also obviates the need replace the relatively heavy ldlibpath.mk by the relatively lightweight projects.mk, thereby enhancing performance.
Signed-off-by: Jan Lindemann <jan@janware.com>
commit
c8fc6326cb
|
|
@ -1,10 +1,10 @@
|
||||||
include $(JWBDIR)/make/ldlibpath.mk
|
include $(JWBDIR)/make/projects.mk
|
||||||
|
|
||||||
TD_GENERATE_FILES += pyproject.toml
|
TD_GENERATE_FILES += pyproject.toml
|
||||||
|
|
||||||
PY_CHECK_EXCLUDE ?=
|
PY_CHECK_EXCLUDE ?=
|
||||||
|
|
||||||
MYPY_CONFIG_PATH = $(subst :,:$$MYPY_CONFIG_FILE_DIR/,:$(PYTHONPATH))
|
MYPY_CONFIG_PATH = $(shell $(JW_PKG_PY) --topdir-format relative projects pythonpath --prefix '$$MYPY_CONFIG_FILE_DIR/' $(PROJECT))
|
||||||
MYPY_PATH_DIRECTIVE = mypy_path = "$(MYPY_CONFIG_PATH)"
|
MYPY_PATH_DIRECTIVE = mypy_path = "$(MYPY_CONFIG_PATH)"
|
||||||
|
|
||||||
ifndef PY_CHECK_ROOTS
|
ifndef PY_CHECK_ROOTS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue