Skip to content

Commit

Permalink
Always recreate api and gui directories on RTD
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
Chilipp committed May 4, 2018
1 parent e74cd09 commit 04fd3e2
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
else:
from urllib.request import urlopen

# make sure, psyplot from parent directory is dused
# make sure, straditize from parent directory is dused
sys.path.insert(0, os.path.abspath('..'))
import straditize

Expand Down Expand Up @@ -62,11 +62,15 @@
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

# create the api documentation
if not osp.exists(osp.join(osp.dirname(__file__), 'api')):
if not osp.exists(osp.join(osp.dirname(__file__), 'api')) or on_rtd:
if osp.exists(osp.join(osp.dirname(__file__), 'api')):
shutil.rmtree(osp.join(osp.dirname(__file__), 'api'))
spr.check_call(['bash', 'apigen.bash'])

if not osp.exists(osp.join(osp.dirname(__file__), 'gui')):
gui_dir = osp.join(osp.dirname(__file__), 'gui')
gui_dir = osp.join(osp.dirname(__file__), 'gui')
if not osp.exists(gui_dir) or on_rtd:
if osp.exists(gui_dir):
shutil.rmtree(gui_dir)
os.mkdir(gui_dir)
files = chain(
glob.glob(osp.join(osp.dirname(__file__), '..', 'straditize',
Expand Down

0 comments on commit 04fd3e2

Please sign in to comment.