jan/feature/20260611-feature/20260611-better-mypy-path into master Remove CmdPythonpathOrig. Its only purpose has ever been to document and try out how cmd_pythonpath_orig() had worked in an ancient application version, that purpose is now served. Signed-off-by: Jan Lindemann <jan@janware.com>
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>
Support additional options:
--subdir makes the command look for these existing
subdirectories. Can be specified multiple times.
--delimiter Does the obvious and defaults to ":"
--prefix A string to prepend verbatim before each path component
Signed-off-by: Jan Lindemann <jan@janware.com>
The global --topdir-format option governs how a project's root directory is represented in paths output by various queries. "absolute" means as absolute path, "unaltered" means verbatim as specified via --topdir, make:xyz means replaced by the string $(xyz), for later expansion in a makefile variable. This commit adds another variant: "relative" yields the shortest possible output format of the output path in question relative to --topdir, with "shortest possible" in this context meaning canonicalized and leading "./" stripped. Signed-off-by: Jan Lindemann <jan@janware.com>