From 18f2842dc1882a75c45c6b223004436b32b7feed Mon Sep 17 00:00:00 2001 From: Ejaaz Merali Date: Wed, 27 Mar 2019 21:29:14 -0400 Subject: [PATCH] Fix setup.py --- setup.py | 12 ++++++++---- tox.ini | 1 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index be554812..c0de0286 100644 --- a/setup.py +++ b/setup.py @@ -34,10 +34,14 @@ "matplotlib>=2.2", ] -# because RTD runs out of memory when using `pip install -e .[rtd]` to install -# docs dependencies for some reason -with open(".build_tools/readthedocs/requirements.txt", "r") as reqs: - rtd_requires = [line.strip() for line in reqs.readlines()] +# using a requirements.txt file for RTD dependencies +# since it runs out of memory when using `pip install -e .[rtd]` to install +# the dependencies for some reason +try: + with open(".build_tools/readthedocs/requirements.txt", "r") as reqs: + rtd_requires = [line.strip() for line in reqs.readlines()] +except FileNotFoundError: + rtd_requires = [] doc_requires = rtd_requires + ["sphinx_rtd_theme>=0.4.1", "sphinx-autobuild>=0.7.1"] diff --git a/tox.ini b/tox.ini index 03c548d5..97bf6e15 100644 --- a/tox.ini +++ b/tox.ini @@ -101,6 +101,7 @@ ignore = max-complexity = 15 exclude = + .tox, .git, __pycache__, build,