-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow installing python deps using pth files #13
Comments
DolceTriade
added a commit
to DolceTriade/rules_pyvenv
that referenced
this issue
Aug 30, 2023
Currently, rules_pyvenv installs all the python deps by symlinking them in site-packages. However, in bazel, the python deps are actually added to the PYTHONPATH, which means that for some deps, just symlinking into site-packages doesn't work. However, venv supports this via pth files. pth files will append the directories specified in the pth file to the PYTHONPATH, which exhibits the behavior we want. Fixes cedarai#13
In https://github.com/aspect-build/rules_py we have this feature. |
DolceTriade
added a commit
to DolceTriade/rules_pyvenv
that referenced
this issue
Jan 30, 2024
Currently, rules_pyvenv installs all the python deps by symlinking them in site-packages. However, in bazel, the python deps are actually added to the PYTHONPATH, which means that for some deps, just symlinking into site-packages doesn't work. However, venv supports this via pth files. pth files will append the directories specified in the pth file to the PYTHONPATH, which exhibits the behavior we want. Fixes cedarai#13
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, rules_pyvenv installs all the python deps by symlinking them in site-packages. However, in bazel, the python deps are actually added to the PYTHONPATH, which means that for some deps, just symlinking into site-packages doesn't work.
However, venv supports this via pth files. Would it be feasible to add a flag to
py_venv
to also create a .pth file to append these deps to the PYTHONPATH as well?The text was updated successfully, but these errors were encountered: