Closed neirbowj closed 3 years ago
I'm seeing this problem too.
here is a reproduction with python3.6 on linux:
$ LANG=C python3 -m pip wheel .
Processing /tmp/appdirs
ERROR: Command errored out with exit status 1:
command: /tmp/appdirs/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-aidjyogf/setup.py'"'"'; __file__='"'"'/tmp/pip-req-build-aidjyogf/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-iozfgf3t
cwd: /tmp/pip-req-build-aidjyogf/
Complete output (9 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-req-build-aidjyogf/setup.py", line 19, in <module>
for line in read("appdirs.py").splitlines():
File "/tmp/pip-req-build-aidjyogf/setup.py", line 13, in read
out = "\n" + inf.read().replace("\r\n", "\n")
File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc8 in position 107: ordinal not in range(128)
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.2.1; however, version 20.2.3 is available.
You should consider upgrading via the '/tmp/appdirs/venv/bin/python3 -m pip install --upgrade pip' command.
The 1.4.4
version of the package is still unusable in Python 3.
Thanks for the submission. Cheers.
When setup.py reads appdirs.py without an encoding defined, it can sometimes fail having guessed the wrong encoding. For example:
Whereas the builtin
open
does not accept theencoding
argument until 3.0,io.open
supportsencoding
under all versions supported by appdirs.