Skip to content

Commit 43d3cfa

Browse files
committed
setup.py: Open text files with utf-8 encoding explicitly
With ASCII locale, it blows up otherwise on Python 3.5 and Python 3.6 on non-Fedora systems, as we have Czech characters in both README and CHANGES. Fixes #46
1 parent 6de8c1b commit 43d3cfa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
from setuptools import setup, Extension
77
import sys
8+
from io import open
89

910
try:
1011
import commands
@@ -90,10 +91,10 @@ def libraries(self, value):
9091
pass
9192

9293

93-
with open('README.rst') as f:
94+
with open('README.rst', encoding='utf-8') as f:
9495
long_description = f.read()
9596

96-
with open('CHANGES.rst') as f:
97+
with open('CHANGES.rst', encoding='utf-8') as f:
9798
long_description += '\n\n'
9899
long_description += f.read()
99100

0 commit comments

Comments
 (0)