We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4afc2e7 commit c4e9d03Copy full SHA for c4e9d03
setup.py
@@ -23,7 +23,7 @@
23
# #
24
###############################################################################
25
26
-import os
+import os, sys
27
28
try:
29
from setuptools import setup, Extension
@@ -39,9 +39,16 @@
39
else:
40
setuptoolsPresent = True
41
42
+
43
+def loadUTF8(path):
44
+ if sys.version_info.major >= 3:
45
+ return open(path, encoding='utf-8').read()
46
47
+ return open(path).read().decode('utf-8')
48
49
def loadTextFrom(path):
- return open(os.path.join(os.path.dirname(__file__),
- path)).read()
50
+ return loadUTF8(os.path.join(os.path.dirname(__file__),
51
+ path))
52
53
cPymice = Extension('pymice._C', sources = ['pymice.cpp'])
54
#install_requires = ['numpy']?
0 commit comments