Changeset 4764
- Timestamp:
- Oct 29, 2007, 2:28:52 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/utilities/compile.py
r4759 r4764 129 129 v = version.replace('.','') 130 130 dllfilename = 'python%s.dll' %(v) 131 libs = os.path.join(sys.exec_prefix,dllfilename)132 131 #libs = os.path.join(sys.exec_prefix,dllfilename) 132 libs, is_found = set_python_dll_path() 133 133 134 134 else: … … 330 330 return C 331 331 332 def check_python_dll(): 333 """ Check that the python dll is present 332 def set_python_dll_path(): 333 """ Find which of the two usual hiding places the python dll is located. 334 335 If the file can't be found, return None. 334 336 """ 335 337 import sys … … 340 342 dllfilename = 'python%s.dll' %(v) 341 343 libs = os.path.join(sys.exec_prefix,dllfilename) 342 344 345 is_found = True 343 346 if access(libs,F_OK) == 0 : 344 print "%s not present.\nPlease install.\nIt is available on the web." \ 345 %(libs) 347 # Hacky - fix if you want 348 libs = os.path.join('c:'+os.sep+'WINNT'+os.sep+'system32',dllfilename) 349 if access(libs,F_OK) == 0 : 350 # could not find the dll 351 libs = os.path.join(sys.exec_prefix,dllfilename) 352 is_found = False 353 return libs, is_found 354 355 def check_python_dll(): 356 libs, is_found = set_python_dll_path() 357 if not is_found: 358 print "%s not found.\nPlease install.\nIt is available on the web." \ 359 %(libs) 346 360 import sys; sys.exit() 361 347 362 348 363 if __name__ == '__main__': 349 350 364 from os.path import splitext 351 365 check_python_dll()
Note: See TracChangeset
for help on using the changeset viewer.