use virtualenv for sphinx builds

This commit is contained in:
Christophe Siraut 2017-10-31 19:38:53 +01:00
parent d42c006398
commit edef2f0bf7
3 changed files with 9 additions and 1 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
venv

5
install_sphinx_venv.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
virtualenv venv
venv/bin/pip install https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz
venv/bin/pip install sphinx recommonmark

View File

@ -166,7 +166,9 @@ def publish_sphinx(module):
checkout_dir = os.path.join(checkouts_directory, module.get('name'))
output_dir = os.path.join(web_directory, module.get('name'))
build_dir = os.path.join(checkout_dir, '_build/html')
os.system('cd %s && make html' % checkout_dir)
cmd = '%s/venv/bin/sphinx-build -b html -d _build/doctrees . _build/html' % os.getcwd()
os.system('cd %s && %s' % (checkout_dir, cmd))
shutil.rmtree(output_dir)
shutil.copytree(build_dir, output_dir)