Skip to content
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

setuptools fails to install wheel files with duplicate entries in .data on Windows #1362

Open
wiggin15 opened this issue May 15, 2018 · 4 comments
Labels
bug Needs Discussion Issues where the implementation still needs to be discussed.

Comments

@wiggin15
Copy link

easy_install fails to install, for example, selenium's wheel file:

> wget http://pypi/media/dists/selenium-3.11.0-py2.py3-none-any.whl\#md5\=4644b52a12a4acf352586794ef792bc9
> easy_install selenium-3.11.0-py2.py3-none-any.whl
Processing selenium-3.11.0-py2.py3-none-any.whl
removing 'c:\cygwin\home\administrator\python\lib\site-packages\selenium-3.11.0-py2.7.egg' (and everything under it)
Installing selenium-3.11.0-py2.py3-none-any.whl to c:\cygwin\home\administrator\python\lib\site-packages
error: [Error 183] Cannot create a file when that file already exists

This is because selenium contains the following files in the wheel file:

selenium/webdriver/firefox/amd64/x_ignore_nofocus.so
selenium-3.11.0.data/data/selenium/webdriver/firefox/amd64/x_ignore_nofocus.so

setuptools tries to copy all the files from .data to the base directory (https://github.com/pypa/setuptools/blob/master/setuptools/wheel.py#L146) and os.renames (https://github.com/pypa/setuptools/blob/master/setuptools/wheel.py#L38) fails on Windows when the destination already exists.

wiggin15 pushed a commit to Infinidat/setuptools that referenced this issue May 15, 2018
wiggin15 pushed a commit to Infinidat/setuptools that referenced this issue May 15, 2018
wiggin15 pushed a commit to Infinidat/setuptools that referenced this issue May 16, 2018
wiggin15 pushed a commit to Infinidat/setuptools that referenced this issue May 16, 2018
wiggin15 pushed a commit to Infinidat/setuptools that referenced this issue May 17, 2018
wiggin15 pushed a commit to Infinidat/setuptools that referenced this issue May 17, 2018
wiggin15 pushed a commit to Infinidat/setuptools that referenced this issue May 17, 2018
@pganssle pganssle added Needs Triage Issues that need to be evaluated for severity and status. bug help wanted Needs Implementation Issues that are ready to be implemented. and removed Needs Triage Issues that need to be evaluated for severity and status. labels Oct 19, 2018
@pganssle
Copy link
Member

Thanks @wiggin15. Sounds like this is indeed a bug.

I imagine the hard part of solving this is going to be writing a test for it (as is so often the case).

@benoit-pierre
Copy link
Member

I still don't think this should not be supported: we should detect it and throw an error.

@pganssle pganssle added Needs Discussion Issues where the implementation still needs to be discussed. and removed Needs Implementation Issues that are ready to be implemented. labels Oct 25, 2018
@pganssle
Copy link
Member

@benoit-pierre I think I may have misunderstood the issue, I thought that they were files that start in different folders but have the same name, pass through some intermediate stage where they are in the same folder, and then are distributed out to new locations where they have different names.

If this is trying to install two different files in the same location, then I think it rightly should be raising an error.

@wiggin15
Copy link
Author

@pganssle I started discussion about this in pypa/packaging-problems#152 but no action has been taken yet. If we think this case should raise an error then this should be the behavior in "pip" and "wheel" too, but in order to open an issue for these projects we need a decision in the PyPA issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Needs Discussion Issues where the implementation still needs to be discussed.
Projects
None yet
Development

No branches or pull requests

3 participants