Skip to content

Commit 1e002a0

Browse files
committed
First attempt at building using setuptools
These changes reflect the same approach as outlined in this issue: readthedocs/readthedocs.org#5512
1 parent 48ba727 commit 1e002a0

File tree

4 files changed

+33
-16
lines changed

4 files changed

+33
-16
lines changed

.readthedocs.yml

+8
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
version: 2
2+
3+
formats:
4+
- pdf
5+
6+
python:
7+
install:
8+
- method: setuptools
9+
path: .

doc/conf.py

+16-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@
88

99
author = 'David Fee & Liam Toney'
1010

11-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon',
12-
'sphinx.ext.intersphinx', 'recommonmark', 'sphinx.ext.viewcode']
11+
extensions = ['sphinx.ext.autodoc',
12+
'sphinx.ext.napoleon',
13+
'sphinx.ext.intersphinx',
14+
'recommonmark',
15+
'sphinx.ext.viewcode'
16+
]
1317

1418
# List of patterns, relative to source directory, that match files and
1519
# directories to ignore when looking for source files.
@@ -22,4 +26,13 @@
2226

2327
master_doc = 'index'
2428

25-
autodoc_mock_imports = ['waveform_collection']
29+
autodoc_mock_imports = ['numpy',
30+
'matplotlib',
31+
'xarray',
32+
'cartopy',
33+
'osgeo',
34+
'obspy',
35+
'utm',
36+
'scipy',
37+
'mpl_toolkits'
38+
]

environment.yml

-12
This file was deleted.

setup.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
from setuptools import setup, find_packages
2+
import os
3+
4+
# https://github.com/readthedocs/readthedocs.org/issues/5512#issuecomment-475073310
5+
on_rtd = os.environ.get('READTHEDOCS') == 'True'
6+
if on_rtd:
7+
INSTALL_REQUIRES = []
8+
else:
9+
INSTALL_REQUIRES = ['waveform_collection']
210

311
setup(
412
name='rtm',
513
packages=find_packages(),
6-
install_requires='waveform_collection'
14+
install_requires=INSTALL_REQUIRES
715
)

0 commit comments

Comments
 (0)