-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
UnicodeDecodeError on Python2 #2003
Comments
A possible solution I found is to add a |
Setuptools will support bugfix releases against the maint/44.x branch as long as they're warranted (worth the trouble of cutting a release). The use-case you describe seems like a reasonable one to support. I'm surprised this issue is only just now being reported, given that |
Interestingly, the issue doesn't happen when using pip to build/install
I'm not sure |
The use case runs this on the extracted source tree. This is used because sometimes patches are required. I don't understand why setup.py install should not be supported. Isn't that how to install packages from source? |
No, the preferred way to install packages is with
I agree with that. I think generally our policy has been "if |
In our case we use it to install pip: first setuptools, then wheel, then pip, see easybuilders/easybuild-easyconfigs#9859 (look at changes, you'll get the gist) so at this point we need the setup.py. Anyway I'm surprised pip works. Doesn't it also run setup.py at some point? |
I'd recommend not installing pip that way. The pip instructions recommend installing using
It does, but it passes other parameters and probably doesn't pass I realize this approach is an inversion from the approach that may have been recommended a decade ago, but things have changed. Get pip first (with the bootstrap script if necessary), then install build tools (if needed; we're working on making setuptools not an implicit requirement for any package). |
Unfortunately this doesn't work right away. To complete the information: Goal: Install pip, setuptools and wheel with specified versions into a given prefix using the system python. It should then be usable as a module (basically: set PYTHONPATH and PATH so binaries and packages are found) With the "old" approach running `setup.py this works (until the update to wheel showing a bug in setuptools). Now there may or may not be a system installed pip. So following approaches:
However it seems using BTW: Seems that using Bonus question: Is there a way to have some security? get-pip doesn't seem to have any releases or checksums to verify. This would be needed also for reproducibility. |
Perhaps. If it works, then I'd say use it. Regardless, we've now established that |
I'm trying to install
wheel
on Python 2 and getting an UnicodeDecodeError caused by a non-ASCII filename in the test tree of the package, see pypa/wheel#331 (comment). When debugging this I found that this is likely a bug in this repo.Short: This appeared after some change while it worked with the same file before.
I found the change which led to the issue: pypa/wheel@e29a5bd
It adds
package_dir={'': 'src'}
which is picked up by setuptools as typeunicode
which leads to an egg-info folder name of typeunicode
while it wasstr
before. See https://github.com/pypa/setuptools/blob/v44.0.0/setuptools/command/egg_info.py#L218 and https://github.com/pypa/setuptools/blob/v44.0.0/setuptools/command/egg_info.py#L223This leads to a mix of str and unicode paths at https://github.com/pypa/setuptools/blob/v44.0.0/setuptools/command/bdist_egg.py#L321 (path is str, prefix is unicode) and then this issue when trying to convert one to the other which it didn't before (as both were str)
Will there be any bugfix release for Python2? Is any workaround possible from side of the wheel package?
To reproduce:
I'm using Python 2.7.5 to install setuptools 44.0.0, then wheel 0.34.2. Both done by downloading the tarball from PyPi and running:
python setup.py build
python setup.py install --prefix=<somedir>
The text was updated successfully, but these errors were encountered: