cmds.projects: Two fixes to Python search path generation #49

Merged
Jan Lindemann merged 2 commits from jan/fix/20260722-cmds-projects-fix-generated-paths into master 2026-07-22 12:09:19 +02:00 AGit

This PR introduces two fixes to the way two Python search paths are generated in the cmd.projects module.

cmds.projects.CmdCreateFile: Add self to extra_paths

pyrightconfig.json as generated by CmdCreateFile, doesn't contain the repository's own Python source location in "extra_paths", fix that.

cmds.projects.CmdPythonpath: Reverse PYTHONPATH

CmdPythonpath, AKA pythonpath, prints a PYTHONPATH which runs from root first to dependency leaves last. This works now but doesn't give local overrides the advantage it should. Fix that.

This PR introduces two fixes to the way two Python search paths are generated in the `cmd.projects` module. #### cmds.projects.CmdCreateFile: Add self to extra_paths `pyrightconfig.json` as generated by `CmdCreateFile`, doesn't contain the repository's own Python source location in "`extra_paths`", fix that. #### cmds.projects.CmdPythonpath: Reverse `PYTHONPATH` CmdPythonpath, AKA pythonpath, prints a `PYTHONPATH` which runs from root first to dependency leaves last. This works now but doesn't give local overrides the advantage it should. Fix that.
pyrightconfig.json as generated by CmdCreateFile, doesn't contain the
repository's own Python source location in "extra_paths", fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
cmds.projects.CmdPythonpath: Reverse PYTHONPATH
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m48s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 3m55s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m46s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 3m54s
CI / Packaging test (push) Successful in 0s
11ccaef832
CmdPythonpath, AKA pythonpath, prints a PYTHONPATH which runs from
root first to dependency leaves last. This works now but doesn't
give local overrides the advantage it should. Fix that.

Signed-off-by: Jan Lindemann <jan@janware.com>
Jan Lindemann scheduled this pull request to auto merge when all checks succeed 2026-07-22 12:01:31 +02:00
Jan Lindemann changed title from cmds.projects: Fix generated paths to cmds.projects: Two fixes to Python search path generation 2026-07-22 12:05:22 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
janware/jw-pkg!49
No description provided.