[svn r62971] Re-added 'gendoc.py' script to build the py lib documentation, now using the
externalized apigen package. The package should be on the PYTHONPATH, if not the script warns. --HG-- branch : trunk
This commit is contained in:
		
							parent
							
								
									e1086ab7f9
								
							
						
					
					
						commit
						af5ba099b3
					
				|  | @ -0,0 +1,22 @@ | |||
| #!/usr/bin/env python | ||||
| 
 | ||||
| import sys | ||||
| import os | ||||
| from _findpy import py | ||||
| try: | ||||
|     import apigen | ||||
| except ImportError: | ||||
|     print 'Can not find apigen - make sure PYTHONPATH is set correctly!' | ||||
|     py.std.sys.exit() | ||||
| else: | ||||
|     args = list(sys.argv[1:]) | ||||
|     argkeys = [a.split('=')[0] for a in args] | ||||
|     if '--apigen' not in argkeys: | ||||
|         args.append('--apigen') | ||||
|     if '--apigenscript' not in argkeys: | ||||
|         fpath = os.path.join( | ||||
|             os.path.dirname(apigen.__file__), 'tool', 'py_build', 'build.py') | ||||
|         args.append('--apigenscript=%s' % (fpath,)) | ||||
|     if '--apigenpath' not in argkeys: | ||||
|         args.append('--apigenpath=/tmp/pylib-api') | ||||
|     py.test.cmdline.main(args) | ||||
|  | @ -1,6 +1,6 @@ | |||
| dist_rsync_roots = ['.'] # XXX | ||||
| 
 | ||||
| pytest_plugins = 'pytest_doctest', 'pytest_pytester', 'pytest_restdoc' | ||||
| pytest_plugins = 'pytest_doctest', 'pytest_pytester', 'pytest_restdoc', 'pytest_apigen' | ||||
| 
 | ||||
| import py | ||||
| class PylibTestPlugin: | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue