File: genAll.py

package info (click to toggle)
python-reportlab 1.13-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 4,880 kB
  • ctags: 4,610
  • sloc: python: 39,480; ansic: 2,225; xml: 1,345; makefile: 57; sh: 24
file content (29 lines) | stat: -rw-r--r-- 759 bytes parent folder | download
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
#!/bin/env python
import os, sys
def _genAll(d=None,verbose=1):
	if not d: d = '.'
	if not os.path.isabs(d):
		d = os.path.normpath(os.path.join(os.getcwd(),d))
	for p in ('reference/genreference.py',
			  'userguide/genuserguide.py',
			  'graphguide/gengraphguide.py',
			  '../tools/docco/graphdocpy.py'):
		os.chdir(d)
		os.chdir(os.path.dirname(p))
		if verbose:
			verboseSuffix = ''
		else:
			verboseSuffix = '-s'
		cmd = '%s %s %s' % (sys.executable,os.path.basename(p), verboseSuffix)
		if verbose:
			print cmd
		os.system(cmd)

"""Runs the manual-building scripts"""
if __name__=='__main__':
	#need a quiet mode for the test suite	
	if '-s' in sys.argv:  # 'silent
		verbose = 0
	else:
		verbose = 1
	_genAll(os.path.dirname(sys.argv[0]),verbose)