Skip to content

Commit

Permalink
fix(#32): use explicit encoding while reading files in setup.py
Browse files Browse the repository at this point in the history
add explicit 'UTF-8' encoding argument into all open file calls
  • Loading branch information
sky-code authored and h2non committed Dec 8, 2016
1 parent d997a30 commit 0b2f1be
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


def read_version(package):
with open(os.path.join(package, '__init__.py'), 'r') as fd:
with open(os.path.join(package, '__init__.py'), 'r', encoding='UTF-8') as fd:
for line in fd:
if line.startswith('__version__ = '):
return line.split()[-1].strip().strip("'")
Expand All @@ -47,13 +47,13 @@ def run_tests(self):
sys.exit(errno)


with open('requirements-dev.txt') as f:
with open('requirements-dev.txt', encoding='UTF-8') as f:
tests_require = f.read().splitlines()
with open('requirements.txt') as f:
with open('requirements.txt', encoding='UTF-8') as f:
install_requires = f.read().splitlines()
with open('README.rst') as f:
with open('README.rst', encoding='UTF-8') as f:
readme = f.read()
with open('History.rst') as f:
with open('History.rst', encoding='UTF-8') as f:
history = f.read()


Expand Down

0 comments on commit 0b2f1be

Please sign in to comment.