Skip to content

Commit 8c0a1a3

Browse files
abukajccluri
authored andcommitted
Windows installation error fixed (#114)
It seems that encoding of text files at Windows systems may default to legacy encodings (like cp1252), thus the utf-8 encoding of the README.rst is now given explicitely.
1 parent c65f9ec commit 8c0a1a3

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,19 @@
22
Python implementation of kernel Current Source Density method
33
"""
44
from setuptools import setup, find_packages
5+
import sys
56

67

78
def readme():
89
"""
910
Used for README
1011
"""
11-
with open('README.rst') as f:
12-
return f.read()
12+
if sys.version_info.major < 3:
13+
with open('README.rst') as f:
14+
return f.read().decode('utf-8')
15+
else:
16+
with open('README.rst', encoding='utf-8') as f:
17+
return f.read()
1318

1419

1520
setup(name='kcsd',

0 commit comments

Comments
 (0)