Skip to content

Commit

Permalink
Merge pull request #23 from mbehrle/fix-codec
Browse files Browse the repository at this point in the history
Fixing UnicodeDecodeError in setup.py (issue22).
  • Loading branch information
pydanny committed Jun 9, 2016
2 parents c6bdbd3 + e75addd commit 285f185
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import os
import sys
import codecs

try:
from setuptools import setup
Expand All @@ -11,8 +12,13 @@

__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')
Expand Down

0 comments on commit 285f185

Please sign in to comment.