From 81a9a65949bdf984f9a58426670d7e8c6f06a0df Mon Sep 17 00:00:00 2001 From: xgdgsc Date: Thu, 7 Jun 2018 22:27:37 +0800 Subject: [PATCH 1/2] allow no readme.md and comma --- setup.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 9fff95e..9efa7c9 100644 --- a/setup.py +++ b/setup.py @@ -34,8 +34,11 @@ here = os.path.abspath(os.path.dirname(__file__)) # Import the README and use it as the long-description. # Note: this will only work if 'README.md' is present in your MANIFEST.in file! -with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: - long_description = '\n' + f.read() +try: + with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: + long_description = '\n' + f.read() +except FileNotFoundError: + long_description = '' # Load the package's __version__.py module as a dictionary. about = {} @@ -89,7 +92,7 @@ setup( version=about['__version__'], description=DESCRIPTION, long_description=long_description, - long_description_content_type='text/markdown' + long_description_content_type='text/markdown', author=AUTHOR, author_email=EMAIL, python_requires=REQUIRES_PYTHON, From c6625ffb63a1ef0c4d5dd44765219a5dae48a6c1 Mon Sep 17 00:00:00 2001 From: xgdgsc Date: Thu, 7 Jun 2018 22:29:37 +0800 Subject: [PATCH 2/2] long = short --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 9efa7c9..b9dfe28 100644 --- a/setup.py +++ b/setup.py @@ -38,7 +38,7 @@ try: with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f: long_description = '\n' + f.read() except FileNotFoundError: - long_description = '' + long_description = DESCRIPTION # Load the package's __version__.py module as a dictionary. about = {}