mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +00:00
Improvements to docs building
This commit is contained in:
parent
a27b2f9805
commit
18bf25f01c
2 changed files with 34 additions and 2 deletions
27
build.sh
27
build.sh
|
|
@ -28,9 +28,11 @@ install_build_tests() {
|
||||||
}
|
}
|
||||||
|
|
||||||
run_build_tests() {
|
run_build_tests() {
|
||||||
coverage run --source=vdirsyncer/,tests/ --module pytest
|
|
||||||
if [ "$TRAVIS" = "true" ]; then
|
if [ "$TRAVIS" = "true" ]; then
|
||||||
|
coverage run --source=vdirsyncer/,tests/ --module pytest
|
||||||
coveralls
|
coveralls
|
||||||
|
else
|
||||||
|
py.test
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -42,11 +44,34 @@ run_build_style() {
|
||||||
flake8 vdirsyncer tests
|
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 "$BUILD" ] || BUILD=tests
|
||||||
[ -n "$DAV_SERVER" ] || DAV_SERVER=radicale
|
[ -n "$DAV_SERVER" ] || DAV_SERVER=radicale
|
||||||
[ -n "$REQUIREMENTS" ] || REQUIREMENTS=release
|
[ -n "$REQUIREMENTS" ] || REQUIREMENTS=release
|
||||||
COMMAND="$1"
|
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/
|
TESTSERVER_BASE=./tests/storage/dav/servers/
|
||||||
|
|
||||||
install_builds() {
|
install_builds() {
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,14 @@ version = '.'.join(release.split('.')[:2]) # The short X.Y version.
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
|
||||||
pygments_style = 'sphinx'
|
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']
|
html_static_path = ['_static']
|
||||||
htmlhelp_basename = 'vdirsyncerdoc'
|
htmlhelp_basename = 'vdirsyncerdoc'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue