sphinx: call sphinx from python rather than in a subprocess