Merge lp:~adrien-saladin/ptools/bug532472 into lp:ptools

Proposed by Adrien Saladin
Status: Merged
Merged at revision: 436
Proposed branch: lp:~adrien-saladin/ptools/bug532472
Merge into: lp:ptools
Diff against target: 124 lines (+51/-40)
1 file modified
SConstruct (+51/-40)
To merge this branch: bzr merge lp:~adrien-saladin/ptools/bug532472
Reviewer Review Type Date Requested Status
Pierre Poulain Approve
Review via email: mp+23999@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Pierre Poulain (pierrepo) wrote :

All compilations and tests went fine.

To merge are the followings OK ?
1/ go in my "trunk" directory
2/ bzr merge lp:~adrien-saladin/ptools/bug532472
3/ bzr push

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'SConstruct'
--- SConstruct 2010-03-18 20:18:52 +0000
+++ SConstruct 2010-04-23 10:50:28 +0000
@@ -106,7 +106,7 @@
106 FORTRANPROG="gfortran -O2 -g -fPIC"106 FORTRANPROG="gfortran -O2 -g -fPIC"
107 gfortranlib=FIND_HEADER(["libgfortran.a", "libgfortran.la",\107 gfortranlib=FIND_HEADER(["libgfortran.a", "libgfortran.la",\
108 "libgfortran.so", "libgfortran.so.3"], [user_path_libg2cgfortran,"/usr/lib","/usr/lib64","/sw/lib",\108 "libgfortran.so", "libgfortran.so.3"], [user_path_libg2cgfortran,"/usr/lib","/usr/lib64","/sw/lib",\
109 "/usr/lib/gcc/x86_64-redhat-linux/3.4.6/","/usr/lib64/gcc/x86_64-suse-linux/4.1.2/"], True)109 "/usr/lib/gcc/x86_64-redhat-linux/3.4.6/","/usr/lib64/gcc/x86_64-suse-linux/4.1.2/","/opt/local/lib/gcc43/"], True)
110 if gfortranlib is not None:110 if gfortranlib is not None:
111 print "libgfortran found here: ", gfortranlib111 print "libgfortran found here: ", gfortranlib
112 LIB_PATH.append(gfortranlib)112 LIB_PATH.append(gfortranlib)
@@ -139,7 +139,7 @@
139139
140140
141boostdir=FIND_HEADER(["boost/shared_array.hpp"], [user_path_boost,"/usr/include", \141boostdir=FIND_HEADER(["boost/shared_array.hpp"], [user_path_boost,"/usr/include", \
142"/sw/include/boost-1_33_1"] )142"/sw/include/boost-1_33_1", "/opt/local/include"] )
143143
144if boostdir is None:144if boostdir is None:
145 print "cannot locate Boost hearders directory, still trying to compile..."145 print "cannot locate Boost hearders directory, still trying to compile..."
@@ -147,40 +147,50 @@
147 print "boost directory found here: ", boostdir 147 print "boost directory found here: ", boostdir
148 COMMON_CPPPATH.append(boostdir)148 COMMON_CPPPATH.append(boostdir)
149149
150python24dir=FIND_HEADER(["Python.h"], ["/usr/include/python2.4", \150PYTHON_CPPPATH = ""
151"/sw/include/python2.4"])151PYTHON_LIBS = ""
152
153if python24dir is not None:
154 print "python2.4 found, configuring path and libs"
155 PYTHON_CPPPATH=[python24dir]
156 PYTHON_LIBS=["python2.4"]
157
158
159if python24dir is None:
160 print "cannot locate python2.4, tying with python2.5:"
161 python25dir = FIND_HEADER(["Python.h"], ["/usr/include/python2.5/",
162 "/sw/include/python2.5/"])
163 if python25dir is None:
164 print "cannot locate Python2.5, the library may not compile..."
165 print "trying to locate Python 2.6:"
166 python26dir = FIND_HEADER(["Python.h"], ["/usr/include/python2.6/",
167 "/sw/include/python2.6/"])
168 if python26dir is not None:
169 print "Python 2.6 found!"
170 PYTHON_CPPPATH=[python26dir]
171 PYTHON_LIBS=["python2.6"]
172 else:
173 PYTHON_CPPPATH=[python25dir]
174 PYTHON_LIBS=["python2.5"]
175
176
177
178PYTHON_CPP=[]152PYTHON_CPP=[]
179import fnmatch153
180import os154if 'python' in COMMAND_LINE_TARGETS or len(COMMAND_LINE_TARGETS)==0:
181for file in os.listdir("Pybindings"):155 python_target = True
182 if fnmatch.fnmatch(file, "*.cpp"):156else:
183 PYTHON_CPP.append("Pybindings/%s"%file)157 python_target = False
158
159if python_target:
160 python24dir=FIND_HEADER(["Python.h"], ["/usr/include/python2.4", \
161 "/sw/include/python2.4"])
162
163 if python24dir is not None:
164 print "python2.4 found, configuring path and libs"
165 PYTHON_CPPPATH=[python24dir]
166 PYTHON_LIBS=["python2.4"]
167
168
169 if python24dir is None:
170 print "cannot locate python2.4, tying with python2.5:"
171 python25dir = FIND_HEADER(["Python.h"], ["/usr/include/python2.5/",
172 "/sw/include/python2.5/"])
173 if python25dir is None:
174 print "cannot locate Python2.5, the library may not compile..."
175 print "trying to locate Python 2.6:"
176 python26dir = FIND_HEADER(["Python.h"], ["/usr/include/python2.6/",
177 "/sw/include/python2.6/"])
178 if python26dir is not None:
179 print "Python 2.6 found!"
180 PYTHON_CPPPATH=[python26dir]
181 PYTHON_LIBS=["python2.6"]
182 else:
183 PYTHON_CPPPATH=[python25dir]
184 PYTHON_LIBS=["python2.5"]
185
186
187
188 PYTHON_CPP=[]
189 import fnmatch
190 import os
191 for file in os.listdir("Pybindings"):
192 if fnmatch.fnmatch(file, "*.cpp"):
193 PYTHON_CPP.append("Pybindings/%s"%file)
184194
185195
186196
@@ -228,12 +238,13 @@
228238
229239
230#check python header file:240#check python header file:
231conf = Configure(python)241if python_target:
232if not conf.CheckCHeader('Python.h'):242 conf = Configure(python)
233 print "you must install either python2.4-dev or python2.5-dev"243 if not conf.CheckCHeader('Python.h'):
234 Exit(1)244 print "you must install either python2.4-dev or python2.5-dev"
245 Exit(1)
235246
236env = conf.Finish()247 env = conf.Finish()
237248
238249
239print "using CPPPATH =", python['CPPPATH']250print "using CPPPATH =", python['CPPPATH']

Subscribers

People subscribed via source and target branches

to all changes: