rules_pyvenv icon indicating copy to clipboard operation
rules_pyvenv copied to clipboard

Allow installing python deps using pth files

Open DolceTriade opened this issue 2 years ago • 1 comments

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?

DolceTriade avatar Aug 30 '23 17:08 DolceTriade

In https://github.com/aspect-build/rules_py we have this feature.

alexeagle avatar Oct 02 '23 18:10 alexeagle