[Python-modules-commits] r20442 - in packages/ocr4gamera/trunk/debian (6 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Mon Feb 13 20:13:09 UTC 2012


    Date: Monday, February 13, 2012 @ 20:13:06
  Author: jwilk
Revision: 20442

Build documentation form source.

Added:
  packages/ocr4gamera/trunk/debian/patches/doc-build-local.diff
  packages/ocr4gamera/trunk/debian/source/options
Modified:
  packages/ocr4gamera/trunk/debian/changelog
  packages/ocr4gamera/trunk/debian/control
  packages/ocr4gamera/trunk/debian/patches/series
  packages/ocr4gamera/trunk/debian/rules

Modified: packages/ocr4gamera/trunk/debian/changelog
===================================================================
--- packages/ocr4gamera/trunk/debian/changelog	2012-02-13 19:50:53 UTC (rev 20441)
+++ packages/ocr4gamera/trunk/debian/changelog	2012-02-13 20:13:06 UTC (rev 20442)
@@ -7,8 +7,14 @@
   * Rewrite debian/rules from scratch, without using dh.
   * Fix hyperlink target in the documentation.
     (doc-fix-hyperlink-target.diff)
+  * Build documentation form source
+    + Update debian/rules.
+    + Add doc/html/ directory to dpkg-source's extend-diff-ignore.
+    + 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 20:50:15 +0100
+ -- Jakub Wilk <jwilk at debian.org>  Mon, 13 Feb 2012 21:07:57 +0100
 
 ocr4gamera (1.0.5-1) experimental; urgency=low
 

Modified: packages/ocr4gamera/trunk/debian/control
===================================================================
--- packages/ocr4gamera/trunk/debian/control	2012-02-13 19:50:53 UTC (rev 20441)
+++ packages/ocr4gamera/trunk/debian/control	2012-02-13 20:13:06 UTC (rev 20442)
@@ -8,7 +8,8 @@
 Build-Depends: debhelper (>= 7.0.50~),
  python-support (>= 0.90), python-all-dev,
  python-gamera (>= 3.2.6), python-gamera-dev,
- python-docutils (>= 0.6)
+ python-docutils (>= 0.6),
+ python-pygments (>= 0.6)
 Standards-Version: 3.9.2
 Homepage: http://gamera.informatik.hsnr.de/addons/ocr4gamera/
 XS-Python-Version: >= 2.4

Added: packages/ocr4gamera/trunk/debian/patches/doc-build-local.diff
===================================================================
--- packages/ocr4gamera/trunk/debian/patches/doc-build-local.diff	                        (rev 0)
+++ packages/ocr4gamera/trunk/debian/patches/doc-build-local.diff	2012-02-13 20:13:06 UTC (rev 20442)
@@ -0,0 +1,47 @@
+Description: 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.
+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 @@
+ #!/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
++   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"),

Modified: packages/ocr4gamera/trunk/debian/patches/series
===================================================================
--- packages/ocr4gamera/trunk/debian/patches/series	2012-02-13 19:50:53 UTC (rev 20441)
+++ packages/ocr4gamera/trunk/debian/patches/series	2012-02-13 20:13:06 UTC (rev 20442)
@@ -1,2 +1,3 @@
 no-wx-import.diff
 doc-fix-hyperlink-target.diff
+doc-build-local.diff

Modified: packages/ocr4gamera/trunk/debian/rules
===================================================================
--- packages/ocr4gamera/trunk/debian/rules	2012-02-13 19:50:53 UTC (rev 20441)
+++ packages/ocr4gamera/trunk/debian/rules	2012-02-13 20:13:06 UTC (rev 20442)
@@ -13,6 +13,8 @@
 	dh_testdir
 	$(python_all) setup.py build
 	rst2man debian/ocr4gamera.rst > debian/ocr4gamera.1
+	rm -rf doc/html/
+	cd doc && python gendoc.py
 
 .PHONY: binary binary-arch binary-indep
 binary binary-indep: build-indep

Added: packages/ocr4gamera/trunk/debian/source/options
===================================================================
--- packages/ocr4gamera/trunk/debian/source/options	                        (rev 0)
+++ packages/ocr4gamera/trunk/debian/source/options	2012-02-13 20:13:06 UTC (rev 20442)
@@ -0,0 +1 @@
+extend-diff-ignore = ^doc/html/




More information about the Python-modules-commits mailing list