-
Notifications
You must be signed in to change notification settings - Fork 564
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
"File already exists" error installing jupyter-contrib-nbextensions on 0.10.0+ #765
Comments
This is a bug in the upstream package. In setuptools, scripts are deprecated in favour of entry_points. In this instance, this distribution package has 2 scripts with the same name. The fix is to remove the script in setup.py. |
Despite the upstream bug (which should be fixed), this did work before in rules_python 0.9.0. Not sure if there's other cases where this can happen - is there a reason why this used to work but now broke? |
And just for my own understanding, are the 2 same scripts caused by: |
Yes, those 2 scripts overwrite. The console_script We now use a PEP compliant installer. All PEP compliant installers will reject that distribution package. We do not support invalid distribution packages and the bug should be fixed upstream by removing the |
Great, thank you |
I saw the same thing with Followup: if/when pypa/installer#216 gets merged, we can then patch pip_installer with some workarounds: diff --git a/python/pip_install/tools/wheel_installer/wheel.py b/python/pip_install/tools/wheel_installer/wheel.py
index 750ebfc..51f1a28 100644
--- a/python/pip_install/tools/wheel_installer/wheel.py
+++ b/python/pip_install/tools/wheel_installer/wheel.py
@@ -606,6 +606,10 @@ class Wheel:
"scripts": "/bin",
"data": "/data",
}
+
+ # Hack
+ overwrite = "qtconsole" in str(self.path)
+
destination = installer.destinations.SchemeDictionaryDestination(
installation_schemes,
# TODO Should entry_point scripts also be handled by installer rather than custom code?
@@ -613,6 +617,7 @@ class Wheel:
script_kind="posix",
destdir=directory,
bytecode_optimization_levels=[],
+ overwrite_existing = overwrite,
)
with installer.sources.WheelFile.open(self.path) as wheel_source: |
🐞 bug report
Affected Rule
pip_parse
Is this a regression?
Yes - confirmed working on 0.9.0, and broke with 0.10.0
Description
🔬 Minimal Reproduction
All in a single folder:
WORKSPACE:
BUILD.bazel
requirements.txt:
Run
bazel build ...
🔥 Exception or Error
🌍 Your Environment
Operating System: Ubuntu 18.04
Output of
bazel version
:Rules_python version:
0.10.2
The text was updated successfully, but these errors were encountered: