Skip to content

Commit

Permalink
Try to add lfs support to rtd
Browse files Browse the repository at this point in the history
  • Loading branch information
gagath committed Jul 29, 2017
1 parent be5a916 commit ebda83d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,20 @@
import sys
sys.path.insert(0, os.path.abspath('..'))

DOC_SOURCES_DIR = os.path.dirname(os.path.abspath(__file__))
PROJECT_ROOT_DIR = os.path.dirname(os.path.dirname(DOC_SOURCES_DIR))
sys.path.insert(0, DOC_SOURCES_DIR)
print('PROJECT_ROOT_DIR', PROJECT_ROOT_DIR)

# If runs on ReadTheDocs environment
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

# Hack for lacking git-lfs support ReadTheDocs
if on_rtd:
print('Fetching files with git_lfs')
from git_lfs import fetch
fetch(PROJECT_ROOT_DIR)


# -- General configuration ------------------------------------------------

Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git-lfs

0 comments on commit ebda83d

Please sign in to comment.