[Python-ogre-commit] SF.net SVN: python-ogre: [518] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <and...@us...> - 2007-12-27 03:04:23
|
Revision: 518
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=518&view=rev
Author: andy_miller
Date: 2007-12-26 19:04:27 -0800 (Wed, 26 Dec 2007)
Log Message:
-----------
Updates for Build system V2
Modified Paths:
--------------
trunk/python-ogre/BuildModule.py
trunk/python-ogre/environment.py
Modified: trunk/python-ogre/BuildModule.py
===================================================================
--- trunk/python-ogre/BuildModule.py 2007-12-26 14:48:44 UTC (rev 517)
+++ trunk/python-ogre/BuildModule.py 2007-12-27 03:04:27 UTC (rev 518)
@@ -74,9 +74,9 @@
##env["LDFLAGS"]="-Wl,-rpath='\$\$ORIGIN/../../lib' -Wl,-rpath='\$\$ORIGIN' -Wl,-z,origin" ### Mac GCC 4.0.1 doesn't support rpath
env["PYTHONPATH"]=PREFIX+"/lib/python2.5/site-packages"
else:
- env["CFLAGS"]="\"-I"+PREFIX+"/include -L"+PREFIX+"/lib\""
- env["CXXFLAGS"]="\"-I"+PREFIX+"/include -L"+PREFIX+"/lib\""
- env["LDFLAGS"]="\"-Wl,-rpath='\$\$ORIGIN/../../lib' -Wl,-rpath='\$\$ORIGIN' -Wl,-z,origin\""
+ env["CFLAGS"]="-I"+PREFIX+"/include -L"+PREFIX+"/lib"
+ env["CXXFLAGS"]="-I"+PREFIX+"/include -L"+PREFIX+"/lib"
+ env["LDFLAGS"]="-Wl,-rpath='\$\$ORIGIN/../../lib' -Wl,-rpath='\$\$ORIGIN' -Wl,-z,origin"
env["PYTHONPATH"]=PREFIX+"/lib/python25/site-packages"
env["PATH"]=PREFIX+"/bin:" + PATH
@@ -135,7 +135,7 @@
usage = "usage: %prog [options] moduleName"
parser = OptionParser(usage=usage, version="%prog 1.0")
parser.add_option("-r", "--retrieve", action="store_true", default=False,dest="retrieve", help="Retrieve the appropiate source before building")
- parser.add_option("-n", "--build", action="store_true", default=False ,dest="build", help="Build the appropiate module")
+ parser.add_option("-b", "--build", action="store_true", default=False ,dest="build", help="Build the appropiate module")
parser.add_option("-g", "--gen", action="store_true", default=False ,dest="gencode", help="Generate Source Code for the module")
parser.add_option("-c", "--compile", action="store_true", default=False ,dest="compilecode", help="Compile Source Code for the module")
@@ -148,31 +148,34 @@
classList = getClassList ()
(options, args) = parseInput()
- if len(args) != 1:
+ if len(args) == 0:
exit("The module to build wasn't specified. Use -h for help")
if options.retrieve==False and options.build==False and options.gencode==False and options.compilecode==False:
exit ( "You need to specific at least one option. Use -h for help")
- moduleName = args[0]
- if not classList.has_key( moduleName ):
- exit("Module specificed was not found (%s is not in environment.py) " % moduleName )
-
if not os.path.exists( environment.downloadPath ):
- os.mkdir ( environment.downloadPath )
- if options.retrieve:
- retrieveSource ( classList[ moduleName ] )
- if options.build :
- buildModule ( classList[ moduleName ] )
- if options.gencode :
- if classList[ moduleName ].pythonModule == True:
- generateCode ( classList[ moduleName ] )
- else:
- exit ( "Module specificed does not generate source code (%s is a supporting module)" % moduleName )
- if options.compilecode :
- if classList[ moduleName ].pythonModule == True:
- compileCode ( classList[ moduleName ] )
- else:
- exit ( "Module specificed does not need compiling (%s is a supporting module)" % moduleName )
+ os.mkdir ( environment.downloadPath )
+
+ if not os.path.exists( environment.Config.ROOT_DIR ):
+ os.mkdir ( environment.Config.ROOT_DIR )
+
+ for moduleName in args:
+ if not classList.has_key( moduleName ):
+ exit("Module specificed was not found (%s is not in environment.py) " % moduleName )
+ if options.retrieve:
+ retrieveSource ( classList[ moduleName ] )
+ if options.build :
+ buildModule ( classList[ moduleName ] )
+ if options.gencode :
+ if classList[ moduleName ].pythonModule == True:
+ generateCode ( classList[ moduleName ] )
+ else:
+ exit ( "Module specificed does not generate source code (%s is a supporting module)" % moduleName )
+ if options.compilecode :
+ if classList[ moduleName ].pythonModule == True:
+ compileCode ( classList[ moduleName ] )
+ else:
+ exit ( "Module specificed does not need compiling (%s is a supporting module)" % moduleName )
-
\ No newline at end of file
+
Modified: trunk/python-ogre/environment.py
===================================================================
--- trunk/python-ogre/environment.py 2007-12-26 14:48:44 UTC (rev 517)
+++ trunk/python-ogre/environment.py 2007-12-27 03:04:27 UTC (rev 518)
@@ -137,6 +137,10 @@
unzip = "unzip "
cvs = "cvs -z3 -q "
svn = "svn --non-interactive "
+ if isMac():
+ sed_ = "sed -i '' "
+ else:
+ sed_ = "sed --in-place "
if isMac():
Config.PATH_Boost = os.path.join(Config.LOCAL_INCLUDE, 'boost-1_34_1')
@@ -206,7 +210,7 @@
if isLinux():
base = 'Cg-2.0_Dec2007_x86'
source = [
- [wget, " http://developer.download.nvidia.com/cg/Cg_1.5/1.5.0/0022/"+base+".tar.gz",downloadPath]
+ [wget, " http://developer.download.nvidia.com/cg/Cg_2.0/2.0.0010/"+base+".tar.gz",downloadPath]
]
buildCmds = [
@@ -340,7 +344,7 @@
source = [
[wget,'http://downloads.sourceforge.net/boost/boost-jam-3.1.16.tgz', downloadPath],
[wget,'http://downloads.sourceforge.net/boost/boost_1_34_1.tar.gz',downloadPath]
- ]
+ ]
buildCmds = [
## first handle bjam
[0, tar + ' zxf ' + os.path.join(downloadPath, bjambase) + '.tgz --overwrite', ''],
@@ -351,9 +355,9 @@
## and now boost
[0, tar + ' zxf ' + os.path.join(downloadPath, base) + '.tar.gz', ''],
[0,'chmod -R +rw *', os.path.join(os.getcwd(), base ) ],
- [0,cp + ' -R'+os.path.join('python-ogre','boost') + '* ' + base , ''], # need to overwrite the boost with our files
- [0,"sed -i '' 's/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/' boost_1_34_1/configure", '' ],
- [0,"sed -i '' s/'BOOST_PYTHON_MAX_ARITY 15'/'BOOST_PYTHON_MAX_ARITY 19'/ boost_1_34_1/boost/python/detail/preprocessor.hpp", ''],
+ [0,cp + ' -R '+os.path.join('python-ogre','boost','*') +' ' + base , ''], # need to overwrite the boost with our files
+ [0, sed_ + " 's/BJAM_CONFIG=\"\"/BJAM_CONFIG=release/' boost_1_34_1/configure", '' ],
+ [0, sed_ + " s/'BOOST_PYTHON_MAX_ARITY 15'/'BOOST_PYTHON_MAX_ARITY 19'/ boost_1_34_1/boost/python/detail/preprocessor.hpp", ''],
[0,"./configure --with-libraries=python --prefix=%s" % PREFIX, os.path.join(os.getcwd(), base )],
[0,'make', os.path.join(os.getcwd(), base )],
[0,'make install', os.path.join(os.getcwd(), base )],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|