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

read PKG-INFO, README as utf-8 #120

Merged
merged 5 commits into from
Jan 27, 2022
Merged

read PKG-INFO, README as utf-8 #120

merged 5 commits into from
Jan 27, 2022

Conversation

bollwyvl
Copy link
Contributor

Thanks for python-libarchive-c, and congratulations on 4.0!

This tries to read PKG-INFO as utf-8 to avoid situations like this, encountered downstream on conda-forge (log):

Processing d:\bld\python-libarchive-c_1642883867449\work\dist
  Added file:///D:/bld/python-libarchive-c_1642883867449/work/dist to build tracker 'C:\\Users\\VssAdministrator\\AppData\\Local\\Temp\\pip-req-tracker-j2qxfoak'
  Running setup.py (path:%SRC_DIR%\dist\setup.py) egg_info for package from file:///D:/bld/python-libarchive-c_1642883867449/work/dist
  Created temporary directory: C:\Users\VssAdministrator\AppData\Local\Temp\pip-pip-egg-info-kwop4uuv
  Running command python setup.py egg_info
  Preparing metadata (setup.py): started
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "D:\bld\python-libarchive-c_1642883867449\work\dist\setup.py", line 12, in <module>
      version=get_version(),
    File "D:\bld\python-libarchive-c_1642883867449\work\dist\version.py", line 39, in get_version
      version = version_re.search(f.read()).group(1)
    File "D:\bld\python-libarchive-c_1642883867449\_h_env\lib\encodings\cp1252.py", line 23, in decode
      return codecs.charmap_decode(input,self.errors,decoding_table)[0]
  UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 4499: character maps to <undefined>
WARNING: Discarding file:///D:/bld/python-libarchive-c_1642883867449/work/dist. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Preparing metadata (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

I guess a follow-on might be to do some testing on non-linux platforms on CI.

Thanks again!

@bollwyvl bollwyvl changed the title read PKG-INFO as utf-8 read PKG-INFO, README as utf-8 Jan 24, 2022
@Changaco Changaco merged commit cbc7e0a into Changaco:master Jan 27, 2022
@Changaco
Copy link
Owner

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants