Passing apidoc options from build

24 views
Skip to first unread message

Mats Wichmann

unread,
Oct 20, 2022, 2:46:54 PM10/20/22
to sphinx-users
I'm feeling dense here... if using sphinx-build, how do you convey options to apidoc?

In particular, we've had requests to organize module docs so the module body comes first, and would like to experiment with that before making a decisions, and I see there's an option for that (-M / --module-first) - but it's unclear to me how to get sphinx-build to pass that along. Is that only available if you invoke apidoc directly as the command-line tool sphinx-apidoc?

There's a stackoverflow article that suggests you can set it in the conf.py file by modifying the command line used to invoke it (https://stackoverflow.com/a/66365397/5003570), but it refers to a variable cmd_line_template that I don't even see a reference to when grepping in the Sphinx code, so I'm not exactly filled with confidence.  Meanwhile, there's an environment variable SPHINX_APIDOC_OPTIONS but it seems not to be for that kind of option?



Reply all
Reply to author
Forward
0 new messages