Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Stop using PYTHONPATH to set up sys.path #1780

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

philsc
Copy link
Contributor

@philsc philsc commented Feb 27, 2024

This patch is an experiment for setting up sys.path inside
the final Python process instead of letting the runtime do it
via PYTHONPATH.

The motivation here is to address these 2 issues:

Try it with:

$ bazel run //tools:wheelmaker -- --help

Look at the generated files.

@aignas
Copy link
Collaborator

aignas commented Mar 1, 2024

Do you think it would help #1174 as well?

@philsc
Copy link
Contributor Author

philsc commented Mar 11, 2024

Do you think it would help #1174 as well?

Not as-is, no. But I think it could. In the python/private/common/entrypoint.tmpl.py file we could add an import hook that tries to resolve imports with the repository name.

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.

None yet

2 participants