[Python-modules-commits] [ocr4gamera] 04/06: doc-build-local
Daniel Stender
danstender-guest at moszumanska.debian.org
Sat Oct 17 20:12:02 UTC 2015
This is an automated email from the git hooks/post-receive script.
danstender-guest pushed a commit to branch master
in repository ocr4gamera.
commit 3aea66dfde8013e2e892295337cd04759c626771
Author: Jakub Wilk <jwilk at debian.org>
Date: Sat Oct 17 22:08:43 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, abort if importing the toolkit didn't succeed.
Forwarded: not-needed
---
doc/gendoc.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/doc/gendoc.py b/doc/gendoc.py
index 6d9bd0b..99030ce 100644
--- a/doc/gendoc.py
+++ b/doc/gendoc.py
@@ -1,8 +1,20 @@
#!/usr/bin/env python
+import os
+import sys
+
from gamera import gendoc
if __name__ == '__main__':
+
+ import gamera.toolkits
+ gamera.toolkits.__path__[:0] = [os.path.join(
+ sys.path[0],
+ os.pardir,
+ 'gamera',
+ 'toolkits'
+ )]
+
# Step 1:
# Import all of the plugins to document.
# Be careful not to load the core plugins, or they
@@ -12,6 +24,7 @@ if __name__ == '__main__':
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"
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/ocr4gamera.git
More information about the Python-modules-commits
mailing list