Skip to content

setup.py needs to specify encoding when reading README.rst #600

@andrewmwilson

Description

@andrewmwilson

I've found another issue with the recent changes to setup.py (2e5031b)

Depending on the current locale, installation fails when setup.py attempts to read README.rst

Collecting arrow<1,>=0 (from this-is-redacted==1.2.3->also-redacted==4.5.6)
  Downloading https://files.pythonhosted.org/packages/90/7f/7fd8accc23aa507d215b5f07b509661c31583010d8276ba844896ee1f44b/arrow-0.14.1.tar.gz (102kB)
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-3mcnwe97/arrow/setup.py", line 7, in <module>
        readme = f.read()
      File "/apps/api/venv_py3/lib/python3.5/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xec in position 3701: ordinal not in range(128)

Also see:
#202
#208
#224

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions