~ubuntu-branches/ubuntu/wily/pyzmq/wily

« back to all changes in this revision

Viewing changes to docs/autogen_api.py

  • Committer: Package Import Robot
  • Author(s): Julian Taylor
  • Date: 2013-02-24 19:23:15 UTC
  • mfrom: (1.2.1) (9 sid)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: package-import@ubuntu.com-20130224192315-qhmwp3m3ymk8r60d
Tags: 2.2.0.1-1
* New upstream release
* relicense debian packaging to LGPL-3
* update watch file to use github directly
  thanks to Bart Martens for the file
* add autopkgtests
* drop obsolete DM-Upload-Allowed
* bump standard to 3.9.4, no changes required

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/env python
 
2
"""Script to auto-generate our API docs.
 
3
"""
 
4
# stdlib imports
 
5
import os
 
6
import sys
 
7
 
 
8
# local imports
 
9
sys.path.append(os.path.abspath('sphinxext'))
 
10
# import sphinx_cython
 
11
from apigen import ApiDocWriter
 
12
 
 
13
#*****************************************************************************
 
14
if __name__ == '__main__':
 
15
    pjoin = os.path.join
 
16
    package = 'zmq'
 
17
    outdir = pjoin('source','api','generated')
 
18
    docwriter = ApiDocWriter(package,rst_extension='.rst')
 
19
    # You have to escape the . here because . is a special char for regexps.
 
20
    # You must do make clean if you change this!
 
21
    docwriter.package_skip_patterns += [ r'\.tests$', r'\.platform$' ]
 
22
 
 
23
    docwriter.module_skip_patterns += [ r'\.tests' ]
 
24
    
 
25
    # Now, generate the outputs
 
26
    docwriter.write_api_docs(outdir)
 
27
    docwriter.write_index(outdir, 'gen',
 
28
                          relative_to = pjoin('source','api')
 
29
                          )
 
30
    print '%d files written' % len(docwriter.written_modules)