[Python-modules-commits] [greekocr4gamera] 08/10: doc-build-local

Daniel Stender danstender-guest at moszumanska.debian.org
Sat Oct 17 18:10:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

danstender-guest pushed a commit to branch master
in repository greekocr4gamera.

commit 7598f30ac99cd8f9e6ab897bca0d5ea6a31171d9
Author: Jakub Wilk <jwilk at debian.org>
Date:   Sat Oct 17 20:05:11 2015 +0200

    doc-build-local
    
       Allow to build documentation from local source. Normally it's only
       possible to build documentation is the toolkit is installed system-wide.
       This patch allows the documentation to be built from local source.
       Also, remove spurious warning.
       Forwarded: not-needed
---
 doc/gendoc.py | 26 +++++++++++---------------
 1 file changed, 11 insertions(+), 15 deletions(-)

diff --git a/doc/gendoc.py b/doc/gendoc.py
index 2ab7d89..6a143f4 100644
--- a/doc/gendoc.py
+++ b/doc/gendoc.py
@@ -1,24 +1,20 @@
 #!/usr/bin/env python
 
+import os
+import sys
+
 from gamera import gendoc
 
 if __name__ == '__main__':
-   # Step 1:
-   # Import all of the plugins to document.
-   # Be careful not to load the core plugins, or they
-   # will be documented here, too.
-   # If the plugins are not already installed, we'll just ignore
-   # them and generate the narrative documentation.
-   try:
-      from gamera.toolkits.greekocr.plugins import clear
-   except ImportError:
-      print "WARNING:"
-      print "This `greekocr` toolkit must be installed before generating"
-      print "the documentation.  For now, the system will skip generating"
-      print "documentation for the plugins."
-      print
 
-   # Step 2:
+   import gamera.toolkits
+   gamera.toolkits.__path__[:0] = [os.path.join(
+      sys.path[0],
+      os.pardir,
+      'gamera',
+      'toolkits'
+   )]
+
    # Generate documentation for this toolkit
    # This will handle any commandline arguments if necessary
    gendoc.gendoc(classes=[("gamera.toolkits.greekocr.greekocr",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/greekocr4gamera.git



More information about the Python-modules-commits mailing list