import os
import sphinx
+import sys
__version__ = '1.0'
yield env.doc2path(x)
yield from ((os.path.join(env.srcdir, dep)
for dep in env.dependencies[x]))
+ for mod in sys.modules.values():
+ if hasattr(mod, '__file__'):
+ if mod.__file__:
+ yield mod.__file__
-def write_depfile(app, env):
+
+def write_depfile(app, exception):
+ if exception:
+ return
+
+ env = app.env
if not env.config.depfile:
return
def setup(app):
app.add_config_value('depfile', None, 'env')
app.add_config_value('depfile_stamp', None, 'env')
- app.connect('env-updated', write_depfile)
+ app.connect('build-finished', write_depfile)
return dict(
version = __version__,