From dd237bb3951635f59ba7ed3adc4aa9a7b26a80ed Mon Sep 17 00:00:00 2001 From: ndparker Date: Sun, 2 Nov 2014 00:14:32 +0100 Subject: [PATCH] try fixing the issue presented in https://github.com/ndparker/rjsmin/pull/2 --- _setup/py2/setup.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_setup/py2/setup.py b/_setup/py2/setup.py index fd86f62..934d806 100644 --- a/_setup/py2/setup.py +++ b/_setup/py2/setup.py @@ -87,7 +87,7 @@ def find_description(docs): summary = None filename = docs.get('meta.summary', 'SUMMARY').strip() if filename and _os.path.isfile(filename): - fp = open(filename) + fp = open(filename, encoding='utf-8') try: try: summary = fp.read().strip().splitlines()[0].rstrip() @@ -99,7 +99,7 @@ def find_description(docs): description = None filename = docs.get('meta.description', 'DESCRIPTION').strip() if filename and _os.path.isfile(filename): - fp = open(filename) + fp = open(filename, encoding='utf-8') try: description = fp.read().rstrip() finally: @@ -125,7 +125,7 @@ def find_classifiers(docs): """ filename = docs.get('meta.classifiers', 'CLASSIFIERS').strip() if filename and _os.path.isfile(filename): - fp = open(filename) + fp = open(filename, encoding='utf-8') try: content = fp.read() finally: @@ -144,7 +144,7 @@ def find_provides(docs): """ filename = docs.get('meta.provides', 'PROVIDES').strip() if filename and _os.path.isfile(filename): - fp = open(filename) + fp = open(filename, encoding='utf-8') try: content = fp.read() finally: @@ -163,7 +163,7 @@ def find_license(docs): """ filename = docs.get('meta.license', 'LICENSE').strip() if filename and _os.path.isfile(filename): - fp = open(filename) + fp = open(filename, encoding='utf-8') try: return fp.read().rstrip() finally: @@ -338,7 +338,7 @@ def run(config=('package.cfg',), ext=None, script_args=None, manifest_only=0): ext = [] cfg = _util.SafeConfigParser() - cfg.read(config) + cfg.read(config, encoding='utf-8') pkg = dict(cfg.items('package')) python_min = pkg.get('python.min') or None python_max = pkg.get('python.max') or None