Building sphinx docs fails with "Cannot find output directory"

Bug #534330 reported by Michael Gliwinski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Michael Gliwinski

Bug Description

Don't know if it's relevant as it's still a work in progress but `make docs-sphinx` fails in a clean 2.1 tree. The error is actually coming from sphinx-build as it seems it cannot deal with some missing directories. These directories are:

- doc/{en,es,ja,ru,developers}/_build/html - this causes the error above ("Cannot find output directory")
- doc/{en,es,ja,ru,developers}/_build/html/_static/{en,es,ja,ru,developers} - this causes OSerror exception (e.g. "OSError: [Errno 2] No such file or directory: '/home/gliwm/workRoot/vcs/bzr/2.1/doc/es/_build/html/_static/es'")

For now I'm working around that with this snippet:

docs=( en es ja ru developers )
for docdir in ${docs[@]}; do
    mkdir -p doc/$docdir/_build/html/_static/$docdir
done

was thinking of adding it to the Makefile but don't know if this is maybe a problem upstream?

Tags: doc

Related branches

Revision history for this message
Martin Pool (mbp) wrote :

It works for me so maybe it's an upstream Sphinx bug.

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Martin Pool (mbp)
Changed in bzr:
status: Confirmed → In Progress
status: In Progress → Incomplete
Revision history for this message
Michael Gliwinski (tzeentch-gm) wrote :

That's really odd. Just tried again in a fresh 2.1 tree and in trunk as well and getting the same thing:

$ cd /tmp
$ bzr branch lp:bzr bzr-trunk
$ cd bzr-trunk
$ make docs-sphinx
python tools/generate_release_notes.py NEWS doc/en/release-notes/index.txt
python tools/generate_docs.py -o doc/en/user-reference/index.txt rstx
make: Circular doc/en/Makefile <- doc/en/Makefile dependency dropped.
python -c "import shutil; shutil.copyfile('doc/en/Makefile', 'doc/es/Makefile')"
make: Circular doc/en/make.bat <- doc/en/make.bat dependency dropped.
python -c "import shutil; shutil.copyfile('doc/en/make.bat', 'doc/es/make.bat')"
python -c "import shutil; shutil.copyfile('doc/en/Makefile', 'doc/ja/Makefile')"
python -c "import shutil; shutil.copyfile('doc/en/make.bat', 'doc/ja/make.bat')"
python -c "import shutil; shutil.copyfile('doc/en/Makefile', 'doc/ru/Makefile')"
python -c "import shutil; shutil.copyfile('doc/en/make.bat', 'doc/ru/make.bat')"
python -c "import shutil; shutil.copyfile('doc/en/Makefile', 'doc/developers/Makefile')"
python -c "import shutil; shutil.copyfile('doc/en/make.bat', 'doc/developers/make.bat')"
cd doc/en && make html
make[1]: Entering directory `/tmp/bzr-trunk/doc/en'
sphinx-build -b html -d _build/doctrees . _build/html
Error: Cannot find output directory.
make[1]: *** [html] Error 1
make[1]: Leaving directory `/tmp/bzr-trunk/doc/en'
make: *** [html-sphinx] Error 2

This is Sphinx v0.4.2 BTW. Any ideas?

Revision history for this message
Michael Gliwinski (tzeentch-gm) wrote :

OK, just tried it on another system with Sphinx 0.6.2 and it worked. So it seems somewhere between 0.4 and 0.6 Sphinx was taught how to create output directories.

Don't know then, it's up to you, the note in the Makefile says Sphinx 0.4 should work, so either it could be changed or we could think of some workaround.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote : Re: [Bug 534330] Re: Building sphinx docs fails with "Cannot find output directory"

Michael Gliwinski wrote:

> Don't know then, it's up to you, the note in the Makefile says Sphinx
> 0.4 should work, so either it could be changed or we could think of some
> workaround.

Let's change the Makefile. Can you submit a merge proposal please?

Ian C.

Revision history for this message
Martin Pool (mbp) wrote :

I don't mind adding the workaround if it's useful to you.

I'm not sure if that shell array syntax is portable so it may be better to put the names directly into the for statement.

Thanks

Propose a merge when you have something you're happy with.

Changed in bzr:
status: Incomplete → Confirmed
Changed in bzr:
assignee: nobody → Michael Gliwinski (tzeentch-gm)
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.