Changeset 8124 for trunk/anuga_core/source/anuga/utilities/compile.py
- Timestamp:
- Mar 3, 2011, 6:04:03 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga/utilities/compile.py
r7940 r8124 175 175 msg += 'One way to check this is to run %s on ' %compiler 176 176 msg += 'the commandline.' 177 raise Exception , msg177 raise Exception(msg) 178 178 179 179 … … 192 192 open(headerfile, 'r') 193 193 except: 194 raise """Did not find Python header file %s.194 raise Exception("""Did not find Python header file %s. 195 195 Make sure files for Python C-extensions are installed. 196 196 In debian linux, for example, you need to install a 197 package called something like python2.3-dev""" %headerfile 197 package called something like python2.3-dev""" %headerfile) 198 198 199 199 … … 243 243 FN = FN + '.c' 244 244 elif ext.lower() != '.c': 245 raise Exception , "Unrecognised extension: " + FN245 raise Exception("Unrecognised extension: " + FN) 246 246 247 247 try: 248 248 open(FN, 'r') 249 249 except: 250 raise Exception , "Could not open: " + FN250 raise Exception("Could not open: " + FN) 251 251 252 252 if not object_files: root1 = root #Remember first filename … … 293 293 err = os.system(s) 294 294 if err != 0: 295 raise 'Attempting to compile %s failed - please try manually' %FN295 raise Exception('Attempting to compile %s failed - please try manually' %FN) 296 296 except: 297 raise 'Could not compile %s - please try manually' %FN297 raise Exception('Could not compile %s - please try manually' %FN) 298 298 299 299 … … 314 314 err=os.system(s) 315 315 if err != 0: 316 raise 'Attempting to link %s failed - please try manually' %root1 316 raise Exception('Attempting to link %s failed - please try manually' 317 % root1) 317 318 except: 318 raise 'Could not link %s - please try manually' %root1319 raise Exception('Could not link %s - please try manually' % root1) 319 320 320 321 … … 352 353 msg = 'C extension %s seems to compile OK, ' 353 354 msg += 'but it can still not be imported.' 354 raise msg355 raise Exception(msg) 355 356 else: 356 357 C=True … … 441 442 msg = 'Could not compile C extension %s\n' %filename 442 443 msg += str(e) 443 raise Exception , msg444 raise Exception(msg) 444 445 else: 445 446 print 'C extension %s OK' %filename
Note: See TracChangeset
for help on using the changeset viewer.