-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Failed to run "pip install ." on Windows when package data contains unicode paths #5972
Comments
For reference, it works fine on Linux:
|
For info this bug was found by @sschuberth and reported here: aboutcode-org/scancode-toolkit#755 |
Thanks for the report. Can you include the path itself in this issue report so people can see it without having to download the zip? What encoding was used? |
@cjerdonek the original encoding of the file paths is not known. And that what makes these things fun.
On windows, they look different of course. They are also here: https://github.com/nexB/scancode-toolkit/tree/1bb19b7cdccc750a488bcebdeb21d427fa61bddb/tests/scancode/data/unicodepath/uc/unicodepath This is a rare case of course, and it is a set of weird files that I have used only for testing of weird unicode path in ScanCode and should not be something that is common. And this is a FUBAR area of Python 2.7 ... there are plenty of bugs there mostly fixed in Python 3.x. As a hint in general on Windows and Python 2.7 IFF you get paths from any |
And based on the above error messages it looks like unicode was not used for paths on Windows. That could be a possible failure condition |
(and of course if you use unicode on POSIX with Python 2.7 things will fail unless you use the backports in backports.os of os.fsencode and os.fsdecode by @pjdelport ) |
@cjerdonek @pradyunsg gentle ping... you both chimed in on this issue. Any update? Or will this not be fixed for 2.7x? |
@pombredanne Can you show the command output when running the command in verbose mode (passing |
@cjerdonek I spun a VM and got this on Python 2.7.16 32 bits on Windows 7 using the example.zip I attached above.
I am porting everyhting on Python 3 so this may be a non problem soon? |
With these minimal changes the exmaple.zip from pypa#5972 installs correctly on Windows. Link: pypa#5972 Signed-off-by: Philippe Ombredanne <[email protected]>
@cjerdonek this can help : pombredanne@84a792b ... this is a minimalist hackish POC to allow the directory in example.zip to be installed alright |
Thanks. Is it really minimal in the sense that if you don’t include any of the four changes, it doesn’t start working? |
So that you don't have to download a random zip file, I'm seeing this with the wheel sdist (specifically wheel 0.33.6, https://pypi.org/project/wheel/0.33.6/#files, although I'm sure it exists in earlier versions as well) as they include some files with unicode filepaths as test data (https://github.com/pypa/wheel/tree/0.33.6/tests/testdata/unicode.dist/unicodedist). |
@cjerdonek re:
Sorry for the late reply, yes this was a minimal patch in that sense (but I reckon now that it would not work on Python 3). With that said, I am inclined to let this issue not be fixed and die of its slow death as it does not exist on Python 3. |
As per pip's documented policy, pip's maintainers won't be fixing such issues but PRs are welcome that address this (and will be subject to our regular review process). I'm going to go ahead and close this, since it's a Python 2-only issue that doesn't merit being tracked and if someone wants to file a PR or move this discussion forward, I suggest they file a new issue. |
Environment
Description
Running
pip install .
on a package that contains paths with unicode file names fails.See the attached minimal zip example.
Expected behavior
The package should be installed.
How to Reproduce
Get package from the attached zip and unzip it on Windows example.zip
Create a virtualenv and activate this
in the extracted package directory, run
pip install .
the installation fails. For info
pip install -e .
works fine (because there is no file copy involved)Output
The text was updated successfully, but these errors were encountered: