Skip to content

Commit b5b8df5

Browse files
committed
Revert readthedocs build
1 parent c47aecf commit b5b8df5

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

docs/requirements.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
sphinx>=1.5
2+
recommonmark
3+
sphinx_rtd_theme
4+
nbsphinx>=0.2.13
5+
jupyter_sphinx
6+
pytest_check_links
7+
pypandoc

readthedocs.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ build:
55

66
python:
77
version: 3.6
8-
pip_install: true
9-
extra_requirements:
10-
- docs
8+
setup_py_install: true
9+
requirements_file: docs/requirements.txt
1110

1211
conda:
1312
file: docs/environment.yml

setupbase.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@
2020
import subprocess
2121
import sys
2222

23+
# MODIFIED: Added readthedocs detection
24+
def in_read_the_docs():
25+
return os.environ.get('READTHEDOCS') == 'True'
26+
2327

2428
# BEFORE importing distutils, remove MANIFEST. distutils doesn't properly
2529
# update it when the contents of directories change.
@@ -176,6 +180,9 @@ def create_cmdclass(prerelease_cmd=None, package_data_spec=None,
176180

177181
if 'bdist_egg' in sys.argv:
178182
egg = wrapper(bdist_egg, strict=True)
183+
# MODIFIED: Enable setup.py install in readthedocs so that files can be modified (like pip install -e)
184+
elif in_read_the_docs():
185+
egg = wrapper(bdist_egg, strict=True)
179186
else:
180187
egg = bdist_egg_disabled
181188

0 commit comments

Comments
 (0)