[h5py] 408/455: Restore doc command

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:55 UTC 2015


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

ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.

commit aac41e5c6756f21f73287ba50657a2190d758e61
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Thu Feb 11 03:34:28 2010 +0000

    Restore doc command
---
 setup.py | 41 ++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/setup.py b/setup.py
index 161b623..8f7baee 100644
--- a/setup.py
+++ b/setup.py
@@ -410,7 +410,46 @@ class cleaner(clean):
                 debug("Cleaning up %s" % path)
         clean.run(self)
 
-CMD_CLASS = {'cython': cython, 'build_ext': hbuild_ext,  'configure': configure, 'clean': cleaner}
+class doc(Command):
+
+
+    """ Regenerate documentation.  Unix only, requires epydoc/sphinx. """
+
+
+    description = "Rebuild documentation"
+
+    user_options = [('rebuild', 'r', "Rebuild from scratch")]
+    boolean_options = ['rebuild']
+
+    def initialize_options(self):
+        self.rebuild = False
+
+    def finalize_options(self):
+        pass
+
+    def run(self):
+        import shutil
+        buildobj = self.distribution.get_command_obj('build')
+        buildobj.run()
+        pth = op.abspath(buildobj.build_lib)
+
+        if self.rebuild and op.exists('docs/build'):
+            shutil.rmtree('docs/build')
+
+        cmd = "export H5PY_PATH=%s; cd docs; make html" % pth
+
+        retval = os.system(cmd)
+        if retval != 0:
+            fatal("Can't build documentation")
+
+        if op.exists('docs/html'):
+            shutil.rmtree('docs/html')
+
+        shutil.copytree('docs/build/html', 'docs/html')
+
+
+CMD_CLASS = {'cython': cython, 'build_ext': hbuild_ext,
+             'configure': configure, 'clean': cleaner, 'doc': doc}
 
 # --- Setup parameters --------------------------------------------------------
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git



More information about the debian-science-commits mailing list