🐞 bug report
Affected Rule
The issue is caused by the rule: pip_import
Is this a regression?
No. Yes. Maybe.
Description
I'm trying to invoke the pip_install workspace rule with Python2, setting python_interpreter to "python2". But pip_install fails with the error /usr/bin/python2: No module named python.pip_install. I tracked this down to missing __init__.py files in the rules_python/python and rules_python/python/pip_install directories. Python2 must require init.py files in the whole module path whereas Python3 doesn't... Anyhow, once the files are there, python2 fails with the error:
File "python/pip_install/extract_wheels/__init__.py", line 18
def configure_reproducible_wheels() -> None:
^
SyntaxError: invalid syntax
Which tells me that that's Python3 syntax. :( Is Python2 not supported for pip_install?
🌍 Your Environment
Output of bazel version:
Bazelisk version: development
Build label: 3.7.1
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Tue Nov 24 17:38:30 2020 (1606239510)
Build timestamp: 1606239510
Build timestamp as int: 1606239510
Rules_python version:
8537cea11d867333c07c465d536778c1b7560cde
python2 --version:
Python 2.7.18
🐞 bug report
Affected Rule
The issue is caused by the rule:
pip_importIs this a regression?
No. Yes. Maybe.
Description
I'm trying to invoke the
pip_installworkspace rule with Python2, settingpython_interpreterto"python2". Butpip_installfails with the error/usr/bin/python2: No module named python.pip_install. I tracked this down to missing__init__.pyfiles in therules_python/pythonandrules_python/python/pip_installdirectories. Python2 must require init.py files in the whole module path whereas Python3 doesn't... Anyhow, once the files are there,python2fails with the error:Which tells me that that's Python3 syntax. :( Is Python2 not supported for
pip_install?🌍 Your Environment
Output of
bazel version:Rules_python version:
python2 --version:
Python 2.7.18