[Python-modules-commits] r20443 - in packages/ocr4gamera/trunk/debian (4 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Mon Feb 13 21:32:35 UTC 2012


    Date: Monday, February 13, 2012 @ 21:32:33
  Author: jwilk
Revision: 20443

Patch gendoc script to import correct plugin.

Added:
  packages/ocr4gamera/trunk/debian/patches/doc-plugin-import.diff
Modified:
  packages/ocr4gamera/trunk/debian/changelog
  packages/ocr4gamera/trunk/debian/patches/doc-build-local.diff
  packages/ocr4gamera/trunk/debian/patches/series

Modified: packages/ocr4gamera/trunk/debian/changelog
===================================================================
--- packages/ocr4gamera/trunk/debian/changelog	2012-02-13 20:13:06 UTC (rev 20442)
+++ packages/ocr4gamera/trunk/debian/changelog	2012-02-13 21:32:33 UTC (rev 20443)
@@ -10,11 +10,13 @@
   * Build documentation form source
     + Update debian/rules.
     + Add doc/html/ directory to dpkg-source's extend-diff-ignore.
+    + Patch gendoc script to import correct plugin.
+      (doc-plugin-import.diff)
     + Patch gendoc script to use local copy of sources.
       (doc-build-local.diff)
     + Add python-pygments to Build-Depends.
 
- -- Jakub Wilk <jwilk at debian.org>  Mon, 13 Feb 2012 21:07:57 +0100
+ -- Jakub Wilk <jwilk at debian.org>  Mon, 13 Feb 2012 22:31:44 +0100
 
 ocr4gamera (1.0.5-1) experimental; urgency=low
 

Modified: packages/ocr4gamera/trunk/debian/patches/doc-build-local.diff
===================================================================
--- packages/ocr4gamera/trunk/debian/patches/doc-build-local.diff	2012-02-13 20:13:06 UTC (rev 20442)
+++ packages/ocr4gamera/trunk/debian/patches/doc-build-local.diff	2012-02-13 21:32:33 UTC (rev 20443)
@@ -2,46 +2,40 @@
  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, abort if importing the toolkit didn't succeed.
 Author: Jakub Wilk <jwilk at debian.org>
 Forwarded: no
 Last-Update: 2012-02-13
 
 --- a/doc/gendoc.py
 +++ b/doc/gendoc.py
-@@ -1,26 +1,19 @@
+@@ -1,8 +1,20 @@
  #!/usr/bin/env python
  
 +import os
 +import sys
 +
  from gamera import gendoc
-+import gamera.toolkits
  
  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.ocr.plugins import clear
--   except ImportError:
--      print "WARNING:"
--      print "This `ocr` toolkit must be installed before generating"
--      print "the documentation.  For now, the system will skip generating"
--      print "documentation for the plugins."
--      print
++
++   import gamera.toolkits
 +   gamera.toolkits.__path__[:0] = [os.path.join(
 +      sys.path[0],
 +      os.pardir,
 +      'gamera',
 +      'toolkits'
 +   )]
- 
--   # Step 2:
--   # Generate documentation for this toolkit
--   # This will handle any commandline arguments if necessary
-    gendoc.gendoc(classes=[("gamera.toolkits.ocr.classes",
-                            "Textline",
-                            "__init__ add_glyph add_glyphs sort_glyphs"),
++
+    # Step 1:
+    # Import all of the plugins to document.
+    # Be careful not to load the core plugins, or they
+@@ -12,6 +24,7 @@
+    try:
+       from gamera.toolkits.ocr.plugins import bbox_merging_mcmillan
+    except ImportError:
++      raise
+       print "WARNING:"
+       print "This `ocr` toolkit must be installed before generating"
+       print "the documentation.  For now, the system will skip generating"

Added: packages/ocr4gamera/trunk/debian/patches/doc-plugin-import.diff
===================================================================
--- packages/ocr4gamera/trunk/debian/patches/doc-plugin-import.diff	                        (rev 0)
+++ packages/ocr4gamera/trunk/debian/patches/doc-plugin-import.diff	2012-02-13 21:32:33 UTC (rev 20443)
@@ -0,0 +1,16 @@
+Description: Import correct plugin when building documentation.
+Author: Jakub Wilk <jwilk at debian.org>
+Forwarded: no
+Last-Update: 2012-02-13
+
+--- a/doc/gendoc.py
++++ b/doc/gendoc.py
+@@ -10,7 +10,7 @@
+    # If the plugins are not already installed, we'll just ignore
+    # them and generate the narrative documentation.
+    try:
+-      from gamera.toolkits.ocr.plugins import clear
++      from gamera.toolkits.ocr.plugins import bbox_merging_mcmillan
+    except ImportError:
+       print "WARNING:"
+       print "This `ocr` toolkit must be installed before generating"

Modified: packages/ocr4gamera/trunk/debian/patches/series
===================================================================
--- packages/ocr4gamera/trunk/debian/patches/series	2012-02-13 20:13:06 UTC (rev 20442)
+++ packages/ocr4gamera/trunk/debian/patches/series	2012-02-13 21:32:33 UTC (rev 20443)
@@ -1,3 +1,4 @@
 no-wx-import.diff
+doc-plugin-import.diff
 doc-fix-hyperlink-target.diff
 doc-build-local.diff




More information about the Python-modules-commits mailing list