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

avoid modification of PYTHONPATH in flux env and the testsuite #6600

Open
grondo opened this issue Feb 4, 2025 · 0 comments
Open

avoid modification of PYTHONPATH in flux env and the testsuite #6600

grondo opened this issue Feb 4, 2025 · 0 comments

Comments

@grondo
Copy link
Contributor

grondo commented Feb 4, 2025

After #6597 is merged, there will remain two places where Flux still, perhaps surprisingly, modifies PYTHONPATH.

One is in flux env, where PYTHONPATH continues to be modified for backwards compatibility. This is due to instructions in the Python docs here:

If you want to import the package from outside of a Flux instance,
running ``/path/to/flux env | grep PYTHONPATH`` in your shell will show you
what PYTHONPATH would be set to if you were running in a Flux instance
built/installed at ``/path/to/flux``.

Perhaps a better solution would actually be to use flux config builtin python_path anyway.

Also, after #6597, sharness.d/01-setup.sh will modify PYTHONPATH so that the correct Python modules are found for any Python script run in the testsuite. This could be avoided if we instead ensure every Python script is run with flux python instead of just python3 or via a shebang line.

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

No branches or pull requests

1 participant