summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 09b1c89..d91ffce 100644
--- a/setup.py
+++ b/setup.py
@@ -164,7 +164,13 @@ def find_make(alt=('gmake', 'gnumake', 'make', 'nmake')):
return make
-long_description = open(os.path.join(BASE_PATH, 'README.rst'), 'U').read()
+if six.PY2:
+ with open(os.path.join(BASE_PATH, 'README.rst'), 'U') as f:
+ long_description = f.read()
+else:
+ with open(os.path.join(BASE_PATH, 'README.rst')) as f:
+ long_description = f.read()
+
distmeta = open(PYCP('distmeta.h')).read().strip().splitlines()
distmeta = [item.split('\"')[1] for item in distmeta]
version = distmeta[0].strip()