-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
having setuptools_scm>6 installed globally breaks pip_install #489
Comments
I made a minimal reproduction gist which fails on ubuntu 20.04 https://gist.github.com/implr/21794a58d87474ddd996027abd79ffee
|
So even if the plugin isn't used |
This seems to be the case, but I don't know enough about setuptools to say for certain. You'll probably start seeing this more often as distros update. |
@thundergolfer I think we can upgrade setuptools now that we have officially sunset python2 #422 or will that break the legacy pip_import rule? |
If anyone still needs older setuptools for python2 they can update their workspace to use an older set of bootstrapping deps, or an older release. |
@implr can you see if latest master, which has a newer setuptools version now, fixes this? |
Yes, it works for us, tested on multiple distros. Thanks. |
@implr The default toolchain is non-hermetic so remains vulnerable to these kind of issues. Recommend switching to an in-build Python interpreter and hooking that up as your |
Affected Rule
The issue is caused by the rule: pip_installDescription
If you have setuptools_scm installed on your system, it will register itself as a setuptools plugin (because /usr/.../site_packages/ is still on sys.path). Then the part in
will attempt to import it. setuptools_scm>6 requires setuptools>=45, rules_python bundles setuptools 44, so that import fails therefore
pip wheel
fails.🔬 Minimal Reproduction
Basically any pip_install invocation which requires building wheels will fail, as long as setuptools_scm>6 is on your global python path.
🔥 Exception or Error
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
I realize this is fairly old, but setuptools is still pinned to 44 on master. I might try to reproduce with rules_python master later.
The text was updated successfully, but these errors were encountered: