From 6dae5fc3e98614e0e65795550354b999b0d38bd8 Mon Sep 17 00:00:00 2001 From: Brian Park Date: Tue, 23 Jan 2018 13:18:00 -0800 Subject: [PATCH] Fix setup.py so that 'pip3 install' doesn't need pypandoc and is more robust under errors. --- setup.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index c7da108..c1a13fa 100644 --- a/setup.py +++ b/setup.py @@ -4,12 +4,17 @@ try: import pypandoc long_description = pypandoc.convert('README.md', 'rst', format='md') -except (EnvironmentError, RuntimeError): - with open('README.md', encoding="utf-8") as f: - long_description = f.read() +except: + # If unable to convert, try inserting the raw README.md file. + try: + with open('README.md', encoding="utf-8") as f: + long_description = f.read() + except: + # If all else fails, use some reasonable string. + long_description = 'BigQuery schema generator.' setup(name='bigquery-schema-generator', - version='0.1.3', + version='0.1.4', description='BigQuery schema generator', long_description=long_description, url='https://github.com/bxparks/bigquery-schema-generator',