Improvements to docs building

This commit is contained in:
Markus Unterwaditzer 2014-05-31 14:33:06 +02:00
parent a27b2f9805
commit 18bf25f01c
2 changed files with 34 additions and 2 deletions

View file

@ -28,9 +28,11 @@ install_build_tests() {
}
run_build_tests() {
coverage run --source=vdirsyncer/,tests/ --module pytest
if [ "$TRAVIS" = "true" ]; then
coverage run --source=vdirsyncer/,tests/ --module pytest
coveralls
else
py.test
fi
}
@ -42,11 +44,34 @@ run_build_style() {
flake8 vdirsyncer tests
}
install_build_docs() {
$PIP_INSTALL sphinx sphinx_rtd_theme
$PIP_INSTALL -e .
}
run_build_docs() {
cd docs
make html
}
[ -n "$BUILD" ] || BUILD=tests
[ -n "$DAV_SERVER" ] || DAV_SERVER=radicale
[ -n "$REQUIREMENTS" ] || REQUIREMENTS=release
COMMAND="$1"
if [ -z "$COMMAND" ]; then
echo "Usage:"
echo "build.sh run # run build"
echo "build.sh install # install dependencies"
echo
echo "Environment variable combinations:"
echo "BUILD=tests # install and run tests"
echo " # (using Radicale, see .travis.yml for more)"
echo "BUILD=style # install and run stylechecker (flake8)"
echo "BUILD=docs # install sphinx and build HTML docs"
exit 1
fi
TESTSERVER_BASE=./tests/storage/dav/servers/
install_builds() {

View file

@ -28,7 +28,14 @@ version = '.'.join(release.split('.')[:2]) # The short X.Y version.
exclude_patterns = ['_build']
pygments_style = 'sphinx'
html_theme = 'default'
import os
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
if not on_rtd:
import sphinx_rtd_theme
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_static_path = ['_static']
htmlhelp_basename = 'vdirsyncerdoc'