[Python-ogre-commit] SF.net SVN: python-ogre: [536] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <and...@us...> - 2008-01-10 08:04:24
|
Revision: 536
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=536&view=rev
Author: andy_miller
Date: 2008-01-10 00:04:29 -0800 (Thu, 10 Jan 2008)
Log Message:
-----------
Try/Except around task spawning and 'unsigned int' include
Modified Paths:
--------------
trunk/python-ogre/BuildModule.py
trunk/python-ogre/code_generators/ogre/generate_code.py
Modified: trunk/python-ogre/BuildModule.py
===================================================================
--- trunk/python-ogre/BuildModule.py 2008-01-08 15:33:45 UTC (rev 535)
+++ trunk/python-ogre/BuildModule.py 2008-01-10 08:04:29 UTC (rev 536)
@@ -77,16 +77,20 @@
env["CFLAGS"]="-I"+os.path.join(PREFIX,"include")+ " -L"+os.path.join(PREFIX,"lib")
env["CXXFLAGS"]=env["CFLAGS"]
env["LDFLAGS"]="-Wl,-rpath='$$ORIGIN/../../lib' -Wl,-rpath='$$ORIGIN' -Wl,-z,origin"
- env["PYTHONPATH"]=PREFIX+"/lib/python"+environment.PythonVersionString+"/site-packages"
- env["ZZIPLIB_LIBS"]="-lzzip"
+ env["PYTHONPATH"]=PREFIX+"/lib/python"+environment.PythonVersionString+"/site-packages"
+ env["ZZIPLIB_LIBS"]="-lzzip"
env["PATH"]=PREFIX+"/bin:" + PATH
logger.debug ( "Spawning '%s' in '%s'" % (task,cwdin) )
process = subprocess.Popen (task, shell=True,stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd = cwdin, env=env)
- out,err = process.communicate()
- returncode = process.returncode
+ try:
+ out,err = process.communicate()
+ returncode = process.returncode
+ except:
+ returncode = -1
+
if returncode != 0:
logger.warning ( "Task Failed" )
logger.debug ( out )
@@ -154,29 +158,29 @@
if len(args) == 0 and not (options.compilecodeall or options.gencodeall):
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\
+ if options.retrieve==False and options.build==False and options.gencode==False and options.compilecode==False\
and options.compilecodeall==False and options.gencodeall==False:
exit ( "You need to specific at least one option. Use -h for help")
setupLogging(options.logfilename)
- logger = logging.getLogger('PythonOgre.BuildModule')
+ logger = logging.getLogger('PythonOgre.BuildModule')
if not os.path.exists( environment.downloadPath ):
- os.mkdir ( environment.downloadPath )
-
+ os.mkdir ( environment.downloadPath )
+
if not os.path.exists( environment.Config.ROOT_DIR ):
- os.mkdir ( environment.Config.ROOT_DIR )
+ os.mkdir ( environment.Config.ROOT_DIR )
if not os.path.exists( os.path.join(environment.Config.ROOT_DIR, 'usr' ) ):
- os.mkdir ( os.path.join(environment.Config.ROOT_DIR, 'usr' ) )
- if options.gencodeall or options.compilecodeall:
+ os.mkdir ( os.path.join(environment.Config.ROOT_DIR, 'usr' ) )
+ if options.gencodeall or options.compilecodeall:
for name,cls in environment.projects.items():
- if cls.active and cls.pythonModule:
- if options.gencodeall:
- generateCode( cls )
- if options.compilecodeall:
+ if cls.active and cls.pythonModule:
+ if options.gencodeall:
+ generateCode( cls )
+ if options.compilecodeall:
compileCode( cls )
-
- else:
+
+ else:
for moduleName in args:
if not classList.has_key( moduleName ):
exit("Module specificed was not found (%s is not in environment.py) " % moduleName )
@@ -195,4 +199,4 @@
else:
exit ( "Module specificed does not need compiling (%s is a supporting module)" % moduleName )
-
+
Modified: trunk/python-ogre/code_generators/ogre/generate_code.py
===================================================================
--- trunk/python-ogre/code_generators/ogre/generate_code.py 2008-01-08 15:33:45 UTC (rev 535)
+++ trunk/python-ogre/code_generators/ogre/generate_code.py 2008-01-10 08:04:29 UTC (rev 536)
@@ -245,8 +245,15 @@
std_ns = global_ns.namespace("std")
- std_ns.class_("pair<unsigned int, unsigned int>").include()
-# std_ns.class_("pair<unsigned, unsigned>").include()
+ try:
+ std_ns.class_("pair<unsigned int, unsigned int>").include()
+ except:
+ print "** Failed including unsigned int"
+ try:
+ std_ns.class_("pair<unsigned, unsigned>").include()
+ except:
+ print "** Failed including unsigned"
+
std_ns.class_("pair<bool, float>").include()
std_ns.class_("pair<Ogre::SharedPtr<Ogre::Resource>, bool>").include()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|