Skip to content

Commit 33620f1

Browse files
committed
Fix utf8 encoding for Python 3 in setup.py (fix #40)
1 parent 9ea4a3f commit 33620f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# -*- coding: utf-8 -*-
33
import re
44
import sys
5+
import codecs
56

67
from setuptools import setup, find_packages
78

@@ -25,7 +26,7 @@ def rst(filename):
2526
- code-block directive
2627
- travis ci build badge
2728
'''
28-
content = open(filename).read()
29+
content = codecs.open(filename, encoding='utf-8').read()
2930
for regex, replacement in PYPI_RST_FILTERS:
3031
content = re.sub(regex, replacement, content)
3132
return content

0 commit comments

Comments
 (0)