Exemple #1
0
 def process_dependencies(self, docname, doctree):
     """Process docutils-generated dependency info."""
     cwd = getcwd()
     frompath = path.join(path.normpath(self.srcdir), 'dummy')
     deps = doctree.settings.record_dependencies
     if not deps:
         return
     for dep in deps.list:
         # the dependency path is relative to the working dir, so get
         # one relative to the srcdir
         if isinstance(dep, bytes):
             dep = dep.decode(fs_encoding)
         relpath = relative_path(frompath,
                                 path.normpath(path.join(cwd, dep)))
         self.dependencies.setdefault(docname, set()).add(relpath)
Exemple #2
0
 def process_dependencies(self, docname, doctree):
     """Process docutils-generated dependency info."""
     cwd = getcwd()
     frompath = path.join(path.normpath(self.srcdir), 'dummy')
     deps = doctree.settings.record_dependencies
     if not deps:
         return
     for dep in deps.list:
         # the dependency path is relative to the working dir, so get
         # one relative to the srcdir
         if isinstance(dep, bytes):
             dep = dep.decode(fs_encoding)
         relpath = relative_path(frompath,
                                 path.normpath(path.join(cwd, dep)))
         self.dependencies.setdefault(docname, set()).add(relpath)
Exemple #3
0
 def process_doc(self, app, doctree):
     # type: (Sphinx, nodes.Node) -> None
     """Process docutils-generated dependency info."""
     cwd = getcwd()
     frompath = path.join(path.normpath(app.srcdir), 'dummy')
     deps = doctree.settings.record_dependencies
     if not deps:
         return
     for dep in deps.list:
         # the dependency path is relative to the working dir, so get
         # one relative to the srcdir
         if isinstance(dep, bytes):
             dep = dep.decode(fs_encoding)
         relpath = relative_path(frompath,
                                 path.normpath(path.join(cwd, dep)))
         app.env.dependencies[app.env.docname].add(relpath)
Exemple #4
0
 def process_doc(self, app, doctree):
     # type: (Sphinx, nodes.Node) -> None
     """Process docutils-generated dependency info."""
     cwd = getcwd()
     frompath = path.join(path.normpath(app.srcdir), 'dummy')
     deps = doctree.settings.record_dependencies
     if not deps:
         return
     for dep in deps.list:
         # the dependency path is relative to the working dir, so get
         # one relative to the srcdir
         if isinstance(dep, bytes):
             dep = dep.decode(fs_encoding)
         relpath = relative_path(frompath,
                                 path.normpath(path.join(cwd, dep)))
         app.env.dependencies[app.env.docname].add(relpath)