I am trying to build documentation for my own sage project on my sage server. I get the error
$ sage -sh -c "make html"
sphinx-build -b html -d build/doctrees source build/html
Running Sphinx v1.6.3
making output directory...
Exception occurred:
File "conf.py", line 30, in <module>
RuntimeError: to build the documentation you need to be inside a Sage shell (run first the command 'sage -sh' in a shell
The full traceback has been saved in /tmp/sphinx-err-ajlNRU.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
Setting permissions of DOT_SAGE directory so only you can read and write it.
make: *** [html] Error 1
This is a very surprising error! It works fine on my local machine, but not on my server. My Travis server is running the following script to build the documentation (ignore the dashes):
- uname -a
- DIR_REPO=$(pwd)
- DIR_INSTALL="${DIR_REPO}"/temp-install-sage
- mkdir "${DIR_INSTALL}"
- cd "${DIR_INSTALL}"
- FILE_NAME="sage-8.2-Ubuntu_16.04-x86_64.tar.bz2"
- tar -xf "${FILE_NAME}"
- sudo ln -s "${DIR_INSTALL}"/SageMath/sage /usr/local/bin/sage
- sage --version
- sage --version
- sage -pip install sphinxcontrib-websupport
- cd "${DIR_REPO}"/docs
- sage -sh -c "make html"
Happy to provide more info if you need it!