-
Notifications
You must be signed in to change notification settings - Fork 11
Description
It seems like rules_pyvenv will only create executables in the venv bin for console scripts.
For example: tox works as intended, generating venv/bin/tox. However nothing is created in the bin for py-spy or pyhcl.
py-spy is actually a rust binary that gets built by maturin, but pyhcl is just regular python.
As far as I can tell, the commonality between them is that when you unzip a wheel of those packages, you get a <package name>.data/scripts folder that contains files that should be copied into the venv bin. There's also no entry_points.txt in their .dist-info folders.
I'm not 100% if this is a bug exclusively with rules_pyvenv. It seems like repositories generated by pip_parse in rules_python all have a bin folder with the mostly correct files in them (the python files have a #!/dev/null shebang), but only the tox repository has an additional py_binary definition in its BUILD.bazel. Edit: It looks like there's a related issue already on rules_python for this: bazel-contrib/rules_python#801
This was how I got to the pip_parse generated directories, assuming pip_parse is named pip:
$(bazel info output_base)/external/pip_tox
$(bazel info output_base)/external/pip_pyhcl
$(bazel info output_base)/external/pip_py_spy
I'd be happy to help work on a fix for this after discussing the best approach.