[GRASS-dev] Issues with Sphinx on osgeo server
wenzeslaus at gmail.com
Sat Oct 4 14:55:31 PDT 2014
On Sat, Oct 4, 2014 at 4:31 PM, Markus Neteler <neteler at osgeo.org> wrote:
> On Fri, Oct 3, 2014 at 10:54 PM, Vaclav Petras <wenzeslaus at gmail.com>
> > On Mon, Sep 29, 2014 at 7:11 AM, Markus Neteler <neteler at osgeo.org>
> > Both conf.py files and Sphinx itself requires import of
> packages/modules. So
> > the documentation build must run inside a valid GRASS session. conf.py
> > checks if GISBASE is set which is but it seems that Python path is not,
> > although the Makefile contains:
> > $(call run_grass,$(SPHINXBUILD) ...)
> > Does `call run_grass` sets PYTHONPATH? It seems that it does:
> > PYTHONPATH="$(GRASS_PYTHONPATH)"
> > It even seems that variable is set properly (although with the syntax I'm
> > never sure):
> > GRASS_PYTHONPATH := $(call mkpath,$(GISBASE)/gui/wxpython,$$PYTHONPATH)
> > GRASS_PYTHONPATH := $(call
> > Now I'm wondering if the module is even there. Do you actually compile
> > or just the documentation?
> I compile all GRASS 7 trunk there.
> I checked again. So the differences are:
> # generate pyGRASS sphinx manual (in docs/html/libpython/)
> (cd lib/python/docs/ ; make libpythonhtml)
> --> works ok
This should not be necessary to execute if you are executing `make
> # generate wxGUI sphinx manual etc, (in main src directory)
> make sphinxdoc
> This compiles both, GUI and Python. See:
Perhaps we can switch the order (just because GUI takes much longer than
The rule sphinxdoc depends on checksphinx, so it should fail when something
@(type $(SPHINXBUILD) > /dev/null || (echo "ERROR: Install
'sphinx-build' software first (get from http://sphinx-doc.org)" && exit 1))
@(type $(SPHINXAPIDOC) > /dev/null || (echo "ERROR: Install
'sphinx-apidoc' software first (get from http://sphinx-doc.org)" && exit 1))
Run `make checksphinx` to see.
> --> fails (also on Fedora):
> Creating file src/vnet.rst.
> Creating file src/web_services.rst.
> Creating file src/wxplot.rst.
> make: Leaving directory
> make -C ./gui/wxpython/docs/wxgui_sphinx/ wxguihtml
> make: Entering directory
> LC_ALL=C -b html -d _build/doctrees -c . src/
> /bin/sh: -b: command not found
No -b command, see 3 lines above, this basically mean that $(SPHINXBUILD)
is not set for
$(call run_grass,$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR_HTML))
I don't have an idea how it can get here. If there is a problem it should
fail. So, maybe the checking is wrong. There is no documentation but the
ifs looks like they just leave $(SPHINXBUILD) undefined if something
nothing i found but then checksphinx should fail.
Besides running `make checksphinx`, you can try to reproduce to do the
steps the rule is doing, basically:
I unified the indentation in the Makefile in
but now I see I missed one line and anyway, it should not play any role in
make: *** [wxguihtml] Error 127
> make: Leaving directory
> make: *** [sphinxdoc] Error 2
> Maybe the "make sphinxdoc" way is yet useless and I'll simply keep the
> previous one for the weekly cronjob.
> If you think that the problem is in `make sphinxdoc` you an try:
But the previous errors were actually different, it was:
File "conf.py", line 27, in <module>
from grass.script import core
ImportError: No module named grass.script
Which would mean that Sphinx was running but the GRASS environment is
wrong. Now GRASS environment is OK (for libpython) or we don't know (for
wxgui) but Sphinx is broken for `make sphinxdoc`
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-dev