rules_pyvenv
rules_pyvenv copied to clipboard
Allow installing python deps using pth files
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?
In https://github.com/aspect-build/rules_py we have this feature.