Merge pull request #23 from mbehrle/fix-codec
authorDaniel Roy Greenfeld <pydanny@users.noreply.github.com>
Thu, 9 Jun 2016 06:01:53 +0000 (23:01 -0700)
committerDaniel Roy Greenfeld <pydanny@users.noreply.github.com>
Thu, 9 Jun 2016 06:01:53 +0000 (23:01 -0700)
Fixing UnicodeDecodeError in setup.py (issue22).

1  2 
setup.py

diff --cc setup.py
index c86b5c975413db7246644e965b476d475c11de89,c26ef9bc8c27a85051b63face234ddec90fd58a5..bd9410ecadbbc0470c85ceab5f396fb5461cddec
+++ b/setup.py
@@@ -9,10 -10,15 +10,15 @@@ try
  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')