diff engine/SConscript @ 175:ea04dfe54aae

* Buildscripts have been modified to work with different python versions. This applys only to linux/freebsd/darwin. For windows the only supported python version remains 2.5.x. On linux/freebsd/darwin 2.5 and 2.6 should work.
author nihathrael@33b003aa-7bff-0310-803a-e67f0ece8222
date Sun, 25 Jan 2009 19:07:57 +0000
parents ab8b11adfb70
children 1587ff8fa3a0
line wrap: on
line diff
--- a/engine/SConscript	Sun Jan 25 12:49:27 2009 +0000
+++ b/engine/SConscript	Sun Jan 25 19:07:57 2009 +0000
@@ -23,10 +23,10 @@
 			swigpath = '"' + os.environ['_SWIG'] + '"\\'
 
 		print "   Generating language specific wrappers for " + lang
-		
+
 		langoutdir = joinpath(swigoutdir, lang)
 		templatefile = joinpath(langoutdir,"fife.i.templ")
-		
+
 		template = Template(open(templatefile).read())
 		inclusions = sorted(['%include ' + str(f) for f in source])
 		inclusions = '\n'.join(inclusions)
@@ -111,7 +111,7 @@
 		for k, d in source_dict.items():
 			create_dict_tree(d)
 		return source_dict
-	
+
 	def get_msvc_repr(d, tabcount=2, curpath=''):
 		retstr = []
 		for k in sorted(d.keys()):
@@ -124,7 +124,7 @@
 				newpath = os.path.join('..', '..', '..', '..', 'engine', newpath)
 				retstr.append(tabcount * '\t' + '<File RelativePath="%s"></File>' % newpath.replace('/','\\'))
 		return '\n'.join(retstr)
-			
+
 	vcpaths = [os.path.abspath(str(f)).split('%sengine%s' % (_sep, _sep))[-1] for f in source]
 	xmlstr = get_msvc_repr(create_dict_tree(dict([[p, {}] for p in vcpaths])))
 	projtxt = open(joinpath(msvcbuildpath, 'engine_template.xml'), 'r').read()
@@ -161,7 +161,7 @@
 		for k, d in source_dict.items():
 			create_dict_tree(d)
 		return source_dict
-	
+
 	def get_msvc_repr(d, tabcount=2, curpath=''):
 		retstr = []
 		for k in sorted(d.keys()):
@@ -174,7 +174,7 @@
 				newpath = os.path.join('..', '..', '..', '..', 'engine', newpath)
 				retstr.append(tabcount * '\t' + '<File RelativePath="%s"></File>' % newpath.replace('/','\\'))
 		return '\n'.join(retstr)
-			
+
 	vcpaths = [os.path.abspath(str(f)).split('%sengine%s' % (_sep, _sep))[-1] for f in source]
 	xmlstr = get_msvc_repr(create_dict_tree(dict([[p, {}] for p in vcpaths])))
 	projtxt = open(joinpath(msvcbuildpath9, 'engine_template.xml'), 'r').read()
@@ -205,7 +205,7 @@
 				<Option link="0"/>
 				<Option target="default"/>
 			</Unit>'''
-	
+
 	codeblocksCppDef = \
 	'''		<Unit filename="..\..\..\..\engine\%s">
 				<Option compilerVar="CPP"/>
@@ -238,7 +238,7 @@
 				<Option link="0"/>
 				<Option target="default"/>
 			</Unit>'''
-	
+
 	codeblocksCppDef = \
 	'''		<Unit filename="../../../engine/%s">
 				<Option compilerVar="CPP"/>
@@ -281,7 +281,7 @@
 		interfacefiles.append(f)
 
 swig = env.SwigWrappers('swigwrappers/python/fife', interfacefiles)
-env.Install('$PREFIX/lib/python2.5/site-packages/fife', ['swigwrappers/python/fife.py'])
+env.Install('$PREFIX/lib/python%s/site-packages/fife'%sys.version[:3], ['swigwrappers/python/fife.py'])
 
 allfiles = list(enginepath.walkfiles())
 headerfiles = [f for f in allfiles if is_headerfile(f)]
@@ -310,5 +310,5 @@
 	if sys.platform != 'win32':
 		env.Command('swigwrappers/%s/_fife.so' % env['script'], flib, [Copy('$TARGET', '$SOURCE')])
 		if sys.platform != 'darwin':
-			env.Install('$PREFIX/lib/python2.5/site-packages/fife', flib)
-#			env.Install('$PREFIX/lib/python2.5/site-packages/fife', [str(f) for f in extensionfiles])
+			env.Install('$PREFIX/lib/python%s/site-packages/fife'%sys.version[:3], flib)
+#			env.Install('$PREFIX/lib/python%s/site-packages/fife'%sys.version[:3], [str(f) for f in extensionfiles])