This commit is contained in:
ndparker 2014-11-02 00:14:32 +01:00
parent 7b9e720034
commit dd237bb395

View File

@ -87,7 +87,7 @@ def find_description(docs):
summary = None summary = None
filename = docs.get('meta.summary', 'SUMMARY').strip() filename = docs.get('meta.summary', 'SUMMARY').strip()
if filename and _os.path.isfile(filename): if filename and _os.path.isfile(filename):
fp = open(filename) fp = open(filename, encoding='utf-8')
try: try:
try: try:
summary = fp.read().strip().splitlines()[0].rstrip() summary = fp.read().strip().splitlines()[0].rstrip()
@ -99,7 +99,7 @@ def find_description(docs):
description = None description = None
filename = docs.get('meta.description', 'DESCRIPTION').strip() filename = docs.get('meta.description', 'DESCRIPTION').strip()
if filename and _os.path.isfile(filename): if filename and _os.path.isfile(filename):
fp = open(filename) fp = open(filename, encoding='utf-8')
try: try:
description = fp.read().rstrip() description = fp.read().rstrip()
finally: finally:
@ -125,7 +125,7 @@ def find_classifiers(docs):
""" """
filename = docs.get('meta.classifiers', 'CLASSIFIERS').strip() filename = docs.get('meta.classifiers', 'CLASSIFIERS').strip()
if filename and _os.path.isfile(filename): if filename and _os.path.isfile(filename):
fp = open(filename) fp = open(filename, encoding='utf-8')
try: try:
content = fp.read() content = fp.read()
finally: finally:
@ -144,7 +144,7 @@ def find_provides(docs):
""" """
filename = docs.get('meta.provides', 'PROVIDES').strip() filename = docs.get('meta.provides', 'PROVIDES').strip()
if filename and _os.path.isfile(filename): if filename and _os.path.isfile(filename):
fp = open(filename) fp = open(filename, encoding='utf-8')
try: try:
content = fp.read() content = fp.read()
finally: finally:
@ -163,7 +163,7 @@ def find_license(docs):
""" """
filename = docs.get('meta.license', 'LICENSE').strip() filename = docs.get('meta.license', 'LICENSE').strip()
if filename and _os.path.isfile(filename): if filename and _os.path.isfile(filename):
fp = open(filename) fp = open(filename, encoding='utf-8')
try: try:
return fp.read().rstrip() return fp.read().rstrip()
finally: finally:
@ -338,7 +338,7 @@ def run(config=('package.cfg',), ext=None, script_args=None, manifest_only=0):
ext = [] ext = []
cfg = _util.SafeConfigParser() cfg = _util.SafeConfigParser()
cfg.read(config) cfg.read(config, encoding='utf-8')
pkg = dict(cfg.items('package')) pkg = dict(cfg.items('package'))
python_min = pkg.get('python.min') or None python_min = pkg.get('python.min') or None
python_max = pkg.get('python.max') or None python_max = pkg.get('python.max') or None