Skip to content

Commit 413d8b7

Browse files
committed
Use UTF-8 as encoding for reading README.md
README.md uses UTF-8 characters and Python will fail to open the file when using LC_ALL=posix: I: pybuild base:184: python3.6 setup.py clean Traceback (most recent call last): File "setup.py", line 48, in <module> long_desc = read('README.md') File "setup.py", line 35, in read return codecs.open(os.path.join(here, *parts), 'r').read() 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 0xe2 in position 11333: ordinal not in range(128) Therefore enforce opening README.md always with UTF-8 encoding. Bug-Debian: https://bugs.debian.org/872506
1 parent 71d13e0 commit 413d8b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333

3434
def read(*parts):
35-
return codecs.open(os.path.join(here, *parts), 'r').read()
35+
return codecs.open(os.path.join(here, *parts), 'r', 'utf-8').read()
3636

3737

3838
def find_version(*file_paths):

0 commit comments

Comments
 (0)