You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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: bazelbuild/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.
The text was updated successfully, but these errors were encountered:
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 noentry_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 bypip_parse
inrules_python
all have abin
folder with the mostly correct files in them (the python files have a#!/dev/null
shebang), but only the tox repository has an additionalpy_binary
definition in itsBUILD.bazel
. Edit: It looks like there's a related issue already on rules_python for this: bazelbuild/rules_python#801This was how I got to the
pip_parse
generated directories, assumingpip_parse
is namedpip
:$(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.
The text was updated successfully, but these errors were encountered: