Skip to content

Commit c1461c6

Browse files
committed
support utf-8 encoded files
1 parent 78bcfbc commit c1461c6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

templates/setup.py.jj2

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{% block header %}
22
{% endblock %}
3+
import codecs
34
{% if external_module_library %}
45
from distutils.core import setup, Extension
56
{% else %}
@@ -136,7 +137,7 @@ def read_files(*files):
136137

137138
def read(afile):
138139
"""Read a file into setup"""
139-
with open(afile, 'r') as opened_file:
140+
with codecs.open(afile, 'r', 'utf-8') as opened_file:
140141
content = filter_out_test_code(opened_file)
141142
content = "".join(list(content))
142143
return content

0 commit comments

Comments
 (0)