Specify encoding when loading readme

Loading readme fails when system locale is not utf-8.

Potentially replaces #1313

Signed-off-by: Ben Firshman <ben@firshman.co.uk>
This commit is contained in:
Ben Firshman 2016-11-28 14:37:34 +00:00
parent c66c7f8b0a
commit a658e14e8b
No known key found for this signature in database
GPG Key ID: 18296449E36D2F1E
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python
import codecs
import os
import sys
@ -35,7 +36,7 @@ with open('./test-requirements.txt') as test_reqs_txt:
long_description = ''
try:
with open('./README.rst') as readme_rst:
with codecs.open('./README.rst', encoding='utf-8') as readme_rst:
long_description = readme_rst.read()
except IOError:
# README.rst is only generated on release. Its absence should not prevent