1

I am using the a waf-tool to build sphinx documentation from GitHub (see here).

How can I add a command like clean_sphinx to that script? I have to add the CleanContext to it, but I do not get how.

wafwafwaf
  • 191
  • 9

1 Answers1

1

In essence, binding a command to a specific context is easy, just inherit from this context:

from waflib.Build import CleanContext

class my_dummy_tmp_class_name(CleanContext):
    cmd = "clean_sphinx"
    fun = "my_sphinx_clean_function"

You can have a look at the waf book ยง7.2.2: Configuration sets for variants. It explains how to add variant commands to all contexts.

neuro
  • 14,948
  • 3
  • 36
  • 59