This commit is contained in:
ndparker 2014-11-02 00:14:32 +01:00
parent 7b9e720034
commit dd237bb395
1 changed files with 6 additions and 6 deletions

View File

@ -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