[h5py] 142/455: Setup and autodoc tweaks

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:26 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 0cb4bfb61a9153e642a16853787a454ac33b3ae2
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Fri Oct 17 23:30:21 2008 +0000

    Setup and autodoc tweaks
---
 MANIFEST.in             |  3 +--
 docs_api/source/conf.py |  3 +++
 setup.py                | 37 +++++++++++++++++--------------------
 3 files changed, 21 insertions(+), 22 deletions(-)

diff --git a/MANIFEST.in b/MANIFEST.in
index 6beb4ee..4721e64 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -8,7 +8,6 @@ recursive-include h5py *.py *.pyx *.pxd *.pxi *.h *.c *.hdf5
 recursive-include licenses *
 recursive-include docs/manual-html *
 recursive-include docs/api-html *
-include docs/API.html
 include docs/Manual.html
-
+include docs/API.html
 
diff --git a/docs_api/source/conf.py b/docs_api/source/conf.py
index bda5050..376f9f7 100644
--- a/docs_api/source/conf.py
+++ b/docs_api/source/conf.py
@@ -12,6 +12,9 @@
 # serve to show the default value.
 
 import sys, os
+pth = os.getenv('H5PY_PATH', None)
+if pth is not None:
+    sys.path[:] = [pth]+sys.path
 
 # If your extensions are in another directory, add it here. If the directory
 # is relative to the documentation root, use os.path.abspath to make it
diff --git a/setup.py b/setup.py
index d3c1f8c..43e10ab 100644
--- a/setup.py
+++ b/setup.py
@@ -378,35 +378,35 @@ class doc(Command):
 
         buildobj = self.distribution.get_command_obj('build')
         buildobj.run()
+        pth = op.abspath(buildobj.build_lib)
 
-        for x in ('docs', 'docs/api-html'):
-            if not op.exists(x):
-                os.mkdir(x, 0755)
+        for x in ('docs/manual-html', 'docs/api-html',
+                  'docs/build', 'docs_api/build'):
+            if op.exists(x):
+                shutil.rmtree(x)
+
+        cmd1 = "cd docs; make html"
+        cmd2 = "export H5PY_PATH=%s; cd docs_api; make html" % pth
 
-        retval = os.spawnlp(os.P_WAIT, 'epydoc', '-q', '--html',
-                    '-o', 'docs/api-html', '--config', 'docs.cfg', 
-                    os.path.join(buildobj.build_lib, NAME) )
+        retval = os.system(cmd1)
         if retval != 0:
-            warn("Could not run epydoc to build documentation.")
+            fatal("Can't build manual")
+        retval = os.system(cmd2)
+        if retval != 0:
+            fatal("Can't build API documentation")
 
+        shutil.copytree('docs/build/html', 'docs/manual-html')
+        shutil.copytree('docs_api/build/html', 'docs/api-html')
 
-        retval = os.system("cd docs; make html")
-        if retval != 0:
-            warn("Could not run Sphinx doc generator")
-        else:
-            if op.exists('docs/manual-html'):
-                shutil.rmtree('docs/manual-html')
-            shutil.copytree('docs/build/html', 'docs/manual-html')
 
 class cyclean(Command):
 
     """ Clean up Cython-generated files and build cache"""
 
-    user_options = [('doc','d','Also destroy compiled documentation')]
-    boolean_options = ['doc']
+    user_options = []
 
     def initialize_options(self):
-        self.doc = False
+        pass
 
     def finalize_options(self):
         pass
@@ -419,9 +419,6 @@ class cyclean(Command):
 
         dirs = ['build']
 
-        if self.doc:
-            dirs += ['docs/api-html', 'docs/manual-html']
-
         for x in dirs:
             try:
                 shutil.rmtree(x)

-- 
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