[pygccxml-commit] SF.net SVN: pygccxml: [17] pyplusplus_dev/setup.py
Brought to you by:
mbaas,
roman_yakovenko
From: <mb...@us...> - 2006-04-28 16:31:29
|
Revision: 17 Author: mbaas Date: 2006-04-28 09:31:23 -0700 (Fri, 28 Apr 2006) ViewCVS: http://svn.sourceforge.net/pygccxml/?rev=17&view=rev Log Message: ----------- Update PYTHONPATH before calling epydoc. This allows generating the documentation even when pygccxml is not 'officially' installed but resides in ../pygccxml_dev Modified Paths: -------------- pyplusplus_dev/setup.py Modified: pyplusplus_dev/setup.py =================================================================== --- pyplusplus_dev/setup.py 2006-04-28 16:18:49 UTC (rev 16) +++ pyplusplus_dev/setup.py 2006-04-28 16:31:23 UTC (rev 17) @@ -14,8 +14,28 @@ pygccxml_available = True except ImportError: pygccxml_available = False - + +def modifyPythonPath(): + """Update PYTHONPATH so that is refers to pygccxml_dev. + + The updated path is required for generating the documentation when + pygccxml is not 'officially' installed. + """ + if not os.environ.has_key( 'PYTHONPATH' ): + os.environ['PYTHONPATH'] = '' + if sys.platform == 'win32': + environment_var_delimiter = ';' + else: + environment_var_delimiter = ':' + + pygccxml_path = os.path.normpath(os.path.join(os.getcwd(), "..", "pygccxml_dev")) + os.environ[ 'PYTHONPATH' ] = os.environ[ 'PYTHONPATH' ] \ + + environment_var_delimiter \ + + pygccxml_path + print "Setting PYTHONPATH to", os.environ["PYTHONPATH"] + + def generate_doc(): """Generate the epydoc reference manual. """ @@ -31,6 +51,7 @@ # '--verbose', 'pyplusplus'] cmd_line = "epydoc " + ' '.join( options ) + modifyPythonPath() print cmd_line os.system(cmd_line) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |