Closed chaudum closed 9 years ago
The reason I moved sphinx-build to external process is that in newer versions, Sphinx calls sys.exit on failure, which also terminates Tinkerer when running in-proc, and we don't always want that.
I see. I've been looking at the Sphinx source code and the only place where they exit on error is https://bitbucket.org/birkenfeld/sphinx/src/71b0148df7589e7fe34fb081ad7f3da4b9ca22b2/sphinx/cmdline.py?at=default#cl-202 Did you mean that? However, that looks more like a bug to me, because everywhere else in the cmdline.main
function they return the status code.
This was recently introduced in the latest Sphinx version so I have no idea whether it is a bug or the way going forward for Sphinx to respond to issues. Anyway, running sphinx-build in-proc now can prematurely terminate tinkerer and in general it should be safer to call it as a separate process. I understand there are some limitations but as long as Sphinx is shipped as a tool not a library, I'd say it's better to do it this way.
fixed build command so
tinkerer --build
can also be used when using tinkerer in buildout environment, e.g.:this requires that sphinx's build_main command is called directly instead of spawing new subprocess (which would require to have sphinx installed globally).