Skip to content

Commit

Permalink
Fixing UnicodeDecodeError in setup.py (issue22).
Browse files Browse the repository at this point in the history
  • Loading branch information
mbehrle committed May 12, 2015
1 parent f045c1c commit e75addd
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.2.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 e75addd

Please sign in to comment.