summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Firshman <ben@firshman.co.uk>2016-11-28 14:37:34 +0000
committerJoffrey F <joffrey@docker.com>2016-12-07 16:34:53 -0800
commitd0758921ff7cd72c29f015f648f86651e6001012 (patch)
tree75b98b1ca963656428bd36e9a3b15084c3173b65
parent24f3edf9a021b1331ec211db3afe8df6f030d0e7 (diff)
downloaddocker-py-d0758921ff7cd72c29f015f648f86651e6001012.tar.gz
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>
-rw-r--r--setup.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 89c97c8..2d1bfdb 100644
--- a/setup.py
+++ b/setup.py
@@ -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