setup.py needs to specify encoding when reading README.rst
See original GitHub issueI’ve found another issue with the recent changes to setup.py (https://github.com/crsmithdev/arrow/commit/2e5031b473bcf10b99b9d7ff8a7e72499c412c07)
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: https://github.com/crsmithdev/arrow/issues/202 https://github.com/crsmithdev/arrow/issues/208 https://github.com/crsmithdev/arrow/issues/224
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
setup.py needs to specify an encoding when opening ... - GitHub
README.md contains non-ascii characters, so setup.py will fail if the locale is ascii, e.g. ... This is easily fixed by using open(..., encoding=" ......
Read more >PyPi and use of ReStructuredText - Matthew Daws
I've in the process of putting together my first proper Python package ... of setup() or in setup.cfg; This needs to be ReStructuredText...
Read more >How to make PyPi description Markdown work? - Stack Overflow
python setup.py sdist bdist_wheel # adjust as needed $ twine upload dist/* ... with io.open('README.md', encoding="utf-8") as f: long_description = f.read().
Read more >https://svn.ietf.org/svn/tools/postfind/trunk/setup.py
For a discussion on single-sourcing # the version across setup.py and the project ... long_description=readme + '\n\n' + changelog_excerpt, # The project's ...
Read more >setup.py · master · LHCb Core Software / LbEnv · GitLab
from setuptools import setup, find_packages ... with open(path.join(here, "README.rst"), encoding="utf-8") as f: 21. long_description = f.read().
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
No problem @andrewmwilson thanks for bringing this up. Hah the seemingly innocuous change seemed to cause the most issues.
Thanks again!