Partly solved.
It seems that the rst bit *has* to have a list, e.g. infconf_product in
('main','') makes it happy.
Also, it seems I have to declare the variable in conf.py, even though it
has a default value in ifconfig.py.
________________________________
From: [email protected] [mailto:[email protected]]
On Behalf Of Alastair Dent
Sent: 19 July 2011 16:48
To: [email protected]
Subject: [sphinx-dev] can't get inconfig extension working.
In ifconfig.py I have:
def setup(app):
app.add_node(ifconfig)
app.add_directive('ifconfig', IfConfig)
app.connect('doctree-resolved', process_ifconfig_nodes)
app.add_config_value('infconf_product', 'main', True)
In an rst file I have:
.. ifconfig:: infconf_product in ('main')
Hello this should be included for main builds.
When I build I get the message:
Exception occurred in .... ifconfig expression:
NameError: name 'ifconfig_product' is not defined.
anyone spot what I have done wrong?
--
You received this message because you are subscribed to the Google
Groups "sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en.
--
You received this message because you are subscribed to the Google Groups
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sphinx-dev?hl=en.