From b0cb4acee2bcc55cdd023528e9cdb10a4e1e98aa Mon Sep 17 00:00:00 2001 From: Mort Yao Date: Sun, 21 Sep 2014 04:39:07 +0200 Subject: [PATCH] setup.py: ignore README.rst if not exist --- setup.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 91616eec..4ea32ad6 100755 --- a/setup.py +++ b/setup.py @@ -8,7 +8,10 @@ PROJ_METADATA = '%s.json' % PROJ_NAME import os, json, imp here = os.path.abspath(os.path.dirname(__file__)) proj_info = json.loads(open(os.path.join(here, PROJ_METADATA), encoding='utf-8').read()) -README = open(os.path.join(here, 'README.rst'), encoding='utf-8').read() +try: + README = open(os.path.join(here, 'README.rst'), encoding='utf-8').read() +except: + README = "" CHANGELOG = open(os.path.join(here, 'CHANGELOG.rst'), encoding='utf-8').read() VERSION = imp.load_source('version', os.path.join(here, 'src/%s/version.py' % PACKAGE_NAME)).__version__