Workaround for LFS images
There is now code in `conf.py` to install git LFS and to check images are correctly fetched.
This commit is contained in:
parent
107ef80b9e
commit
72c060c213
1 changed files with 12 additions and 0 deletions
|
|
@ -15,6 +15,18 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
# Workaround to install and execute git-lfs on Read the Docs
|
||||||
|
if os.system("git lfs env > /dev/null") == 0:
|
||||||
|
os.system("git lfs fetch")
|
||||||
|
os.system("git lfs checkout")
|
||||||
|
else:
|
||||||
|
print("Warning: it seems git lfs is not installed. Bodging our way around the problem to retrieve images...")
|
||||||
|
os.system('wget https://github.com/git-lfs/git-lfs/releases/download/v2.7.1/git-lfs-linux-amd64-v2.7.1.tar.gz')
|
||||||
|
os.system('tar xvfz git-lfs-linux-amd64-v2.7.1.tar.gz')
|
||||||
|
os.system('./git-lfs install') # make lfs available in current repository
|
||||||
|
os.system('./git-lfs fetch') # download content from remote
|
||||||
|
os.system('./git-lfs checkout') # make local files to have the real content on them
|
||||||
|
|
||||||
# Load module from relative imports by modifying the path
|
# Load module from relative imports by modifying the path
|
||||||
|
|
||||||
module_path = os.path.abspath("../..")
|
module_path = os.path.abspath("../..")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue