Skip to content

Commit

Permalink
add try-except for importing readme when building the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann committed Apr 9, 2020
1 parent 9e7ef4b commit d9fd913
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@
'deploy': ['twine', 'setuptools', 'wheel'],
}

with open('README.md', 'r') as f:
LONG_DESCRIPTION = f.read()
# building the docs on readthedocs fails with a FileNotFoundError
# https://github.com/IAMconsortium/pyam/issues/363
try:
with open('README.md', 'r') as f:
LONG_DESCRIPTION = f.read()
except FileNotFoundError:
LONG_DESCRIPTION = ''

# thank you https://stormpath.com/blog/building-simple-cli-interfaces-in-python
class RunTests(Command):
Expand Down

0 comments on commit d9fd913

Please sign in to comment.