Update of /cvsroot/wpdev/wolfpack
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2521
Modified Files:
configure.py
Log Message:
Adding command-line parsing
Index: configure.py
===================================================================
RCS file: /cvsroot/wpdev/wolfpack/configure.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** configure.py 19 Jul 2004 23:18:33 -0000 1.6
--- configure.py 26 Jul 2004 05:47:25 -0000 1.7
***************
*** 13,16 ****
--- 13,17 ----
import dircache
import string
+ from optparse import OptionParser
# These are the variables we are trying to figure out
***************
*** 63,67 ****
return True
! def checkPython():
if sys.platform == "win32":
PYTHONLIBSEARCHPATH = [ sys.prefix + "\Libs\python*.lib" ]
--- 64,68 ----
return True
! def checkPython(options):
if sys.platform == "win32":
PYTHONLIBSEARCHPATH = [ sys.prefix + "\Libs\python*.lib" ]
***************
*** 79,82 ****
--- 80,90 ----
else:
sys.stdout.write("ERROR: Unknown platform %s to checkPython()" % sys.platform )
+
+ # if it was overiden...
+ if options.py_incpath:
+ PYTHONINCSEARCHPATH = [ options.py_incpath ]
+ if options.py_libpath:
+ PYTHONLIBSEARCHPATH = [ options.py_libpath ]
+
sys.stdout.write( "Checking Python version... " )
if sys.hexversion >= 0x020300F0:
***************
*** 112,116 ****
# Entry point
def main():
! checkPython()
checkQt()
--- 120,134 ----
# Entry point
def main():
!
! # Setup command line parser
! parser = OptionParser(version="%prog 0.1")
! parser.add_option("--dsp", action="store_true", dest="dsp", help="also Generate Visual Studio project files")
! parser.add_option("--python-includes", dest="py_incpath", help="Python include directory")
! parser.add_option("--python-libraries", dest="py_libpath", help="Python library path")
! parser.add_option("--qt-directory", dest="qt_dir", help="Base directory of Qt")
!
! (options, args) = parser.parse_args()
!
! checkPython(options)
checkQt()
***************
*** 136,142 ****
config.close()
! sys.stdout.write("Generating makefile...")
! os.execv(qt_qmake, [qt_qmake, "wolfpack.pro"])
!
if __name__ == "__main__":
--- 154,164 ----
config.close()
! sys.stdout.write("Generating makefile...\n")
! os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro"])
! if options.dsp:
! sys.stdout.write("Generating Visual Studio project files...\n")
! os.spawnv(os.P_WAIT, qt_qmake, [qt_qmake, "wolfpack.pro", "-t vcapp"])
! sys.stdout.write("Done")
! sys.stdout.write("Configure finished. Please run make now.")
if __name__ == "__main__":
|