File: build.py

package info (click to toggle)
pymodbus 2.1.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,704 kB
  • sloc: python: 17,594; makefile: 83; sh: 8
file content (38 lines) | stat: -rwxr-xr-x 962 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env python
'''
Epydoc API Runner
------------------

Using pkg_resources, we attempt to see if epydoc is installed,
if so, we use its cli program to compile the documents
'''
try:
    import sys, os, shutil
    import pkg_resources
    pkg_resources.require("epydoc")

    from epydoc.cli import cli
    sys.argv = '''epydoc.py pymodbus
        --html --simple-term --quiet
        --include-log
        --graph=all
        --docformat=plaintext
        --debug
        --exclude=._
        --exclude=tests
        --output=html/
    '''.split()
    #bugs in trunk for --docformat=restructuredtext

    if not os.path.exists("./html"):
        os.mkdir("./html")

    print "Building Epydoc API Documentation"
    cli()

    if os.path.exists('../../../build'):
        shutil.move("html", "../../../build/epydoc")
except Exception, ex:
    import traceback,sys
    traceback.print_exc(file=sys.stdout)
    print "Epydoc not avaliable...not building"