Skip to content

Add our repository in update script to PYTHONPATH#12

Merged
mristin merged 1 commit intomainfrom
empwilli/fix_update_script
Oct 30, 2025
Merged

Add our repository in update script to PYTHONPATH#12
mristin merged 1 commit intomainfrom
empwilli/fix_update_script

Conversation

@empwilli
Copy link
Collaborator

We need to include the root of the repository in the dev. script for updating meta, codegen and testgen since newer Python versions (3.11 and 3.12, and newer) use more strict setuptools. Hence, the module dev_scripts/ is not automatically included in PYTHONPATH.

@empwilli empwilli requested a review from mristin October 29, 2025 13:14
@empwilli empwilli force-pushed the empwilli/fix_update_script branch from 794a108 to 1720285 Compare October 29, 2025 13:15
# . This means that the ``dev_scripts`` module will not be on the Python path,
# as newer versions of setuptools only put packages explicitly found by
# ``find_packages``.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inline this in a function _add_our_repo_to_python_path, then call _add_our_repo_to_python_path in the global scope, so that this_path does not shadow this_path in main.

@empwilli empwilli force-pushed the empwilli/fix_update_script branch from 1720285 to 3b12575 Compare October 30, 2025 15:14
We need to include the root of the repository in the dev. script for
updating meta, codegen and testgen since newer Python versions (3.11 and
3.12, and newer) use more strict setuptools. Hence, the module
``dev_scripts/`` is not automatically included in PYTHONPATH.
@empwilli empwilli force-pushed the empwilli/fix_update_script branch from 3b12575 to 931f04a Compare October 30, 2025 15:29
@mristin mristin merged commit aa431e1 into main Oct 30, 2025
1 check passed
@mristin mristin deleted the empwilli/fix_update_script branch October 30, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants