Fixing UnicodeDecodeError in setup.py (issue22).
except ImportError:
from distutils.core import setup
-__version__ = '1.2.0'
+__version__ = '1.3.0'
- readme = open('README.rst').read()
- history = open('HISTORY.rst').read().replace('.. :changelog:', '')
+
+ def read(fname):
+ return codecs.open(
+ os.path.join(os.path.dirname(__file__), fname), 'r', 'utf-8').read()
+
+ readme = read('README.rst')
+ history = read('HISTORY.rst').replace('.. :changelog:', '')
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist bdist_wheel upload')