Open our README appropriately

Systems without a LOCALE present will not be able to read our file
appropriately on Python 3. This was causing our Python 3 CI jobs on
GitLab to fail.
This commit is contained in:
Ian Cordasco 2016-06-26 07:13:16 -05:00
parent b82e0d5176
commit 790549fd25
No known key found for this signature in database
GPG key ID: 656D3395E4A9791A

View file

@ -3,6 +3,7 @@
from __future__ import with_statement
import functools
import io
import os
import sys
@ -49,7 +50,7 @@ def get_long_description():
"""Generate a long description from the README and CHANGES files."""
descr = []
for fname in ('README.rst',):
with open(fname) as f:
with io.open(fname, encoding='utf-8') as f:
descr.append(f.read())
return '\n\n'.join(descr)