building_documentation

(function from pyomo.common.flags)

pyomo.common.flags.building_documentation(state=NOTSET)[source]

True if we are building the Sphinx documentation

We detect if we are building the documentation by looking if the sphinx or Sphinx modules are imported.

Parameters:

state (bool or None) – If provided, sets the current state of the building environment flag (Setting to None reverts to the normal interrogation of sys.modules)

Return type:

bool