bitprophet / releases

A powerful Sphinx changelog-generating extension.
http://releases.readthedocs.io/
BSD 2-Clause "Simplified" License
176 stars 41 forks source link

util.parse_changelog seems to skip extensions/conf #75

Closed bitprophet closed 6 years ago

bitprophet commented 6 years ago

util.parse_changelog is almost surely only used by yours truly; specifically, it was created to encapsulate changelog rendering at the programmatic level for use in things like Invocations' release collection.

Previously, it was only used on my projects that have split www/docs sites, but I think using it on single/small doc trees is now problematic? Specifically, Patchwork is a single doc tree but it also uses extensions like autodoc, which I think may be a first.

The result is that trying to prepare a Patchwork release blows up on changelog render with WARNING: Unknown directive type "automodule" even though regular doc building works fine.

This suggests to me that util.parse_changelog, with its non-idiosyncratic fucking-about with Sphinx internals to render docs on the fly instead of using sphinx-build, is skipping the conf.py and thus not loading extensions. This wasn't a problem on the split-site projects because their www sites (containing the changelog) don't normally use any other extensions besides Releases itself.

Hopefully I can extend this util func to load the conf file without everything getting super screwy.

bitprophet commented 6 years ago

Right, it's technically missing from util.make_app, which makes its own pseudo-config from whole cloth.

I don't recall exactly why we do it that way instead of e.g. taking the real config & then just tweaking what needs tweaking. However, going by the principle of changing the least shit to fix your problem, I've got a "load the conf.py by itself, then just pull out the extensions list" approach apparently working fine.