The best way to do this is probably to inspect the local environment in your conf.py file (which is really just a python file, so you can do whatever you normally can from python), and then manipulate the list of "tags" which the ".. only::" directive uses. See:
http://www.sphinx-doc.org/en/stable/markup/misc.html#directive-only http://www.sphinx-doc.org/en/stable/config.html#conf-tags then use the only directive to have users with/without whatever tag you set not display the content in question. Might be tricky for your specific use case, but that's how I would approach it in general. On Fri, Mar 10, 2017 at 11:11 AM, Matthias Geier <[email protected]> wrote: > Dear list. > > Following scenario: > > * A small part of the docs uses a certain Sphinx extension with some > dependencies to parse source files. > > * Some contributors don't have those dependencies installed. > > Is it possible to somehow skip the affected source files if the > dependencies are missing? > > Is there some kind of exception I can throw to skip processing the > current source file? > > I've intentionally kept this question generic, for a more concrete > problem description, see > https://github.com/spatialaudio/nbsphinx/issues/72#issuecomment-284930707. > > cheers, > Matthias > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/sphinx-users. > For more options, visit https://groups.google.com/d/optout. > -- -- Kevin Horn -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sphinx-users. For more options, visit https://groups.google.com/d/optout.
