Skip to content

Commit 752a430

Browse files
committed
fix setup.py installation in py34 environment on Windows
1 parent 4b3ac57 commit 752a430

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

setup.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515

1616

1717
# strip links from the descripton on the PyPI
18-
LONG_DESCRIPTION = open("README.rst").read().replace("`_", "`")
18+
if python_version_tuple()[0] >= '3':
19+
LONG_DESCRIPTION = open("README.rst", "r", encoding="utf-8").read().replace("`_", "`")
20+
else:
21+
LONG_DESCRIPTION = open("README.rst", "r").read().replace("`_", "`")
22+
1923
# strip Build Status from the PyPI package
2024
if python_version_tuple()[:2] >= ('2', '7'):
2125
LONG_DESCRIPTION = re.sub("^Build status\n(.*\n){7}", "", LONG_DESCRIPTION, flags=re.M)

0 commit comments

Comments
 (0)