Ticket #37630: relax.patch
File relax.patch, 3.9 KB (added by howarth@…, 12 years ago) |
---|
-
sconstruct
old new 100 100 SYS = SYSTEM 101 101 102 102 # Mac OS X installation path. 103 INSTALL_PATH = sys.prefix + sep + 'local'103 INSTALL_PATH = '@DEST_ROOT@@PREFIX@' + sep + 'lib' 104 104 105 105 106 106 # All other operating systems. … … 120 120 RELAX_PATH = INSTALL_PATH + sep + 'relax' 121 121 122 122 # Installation path for binaries. 123 BIN_PATH = INSTALL_PATH+ sep + 'bin'123 BIN_PATH = '@DEST_ROOT@@PREFIX@' + sep + 'bin' 124 124 125 125 # Symbolic link installation path. 126 126 SYMLINK = BIN_PATH + sep + 'relax' 127 127 128 128 129 130 129 # The distribution files. 131 130 ######################### 132 131 … … 533 532 'relax_fit.c'] 534 533 535 534 # Construct the python include path (for Python.h). 536 py_include_minpath = sys.prefix + path.sep + 'include'535 py_include_minpath = '@PYTHON_INCL@' + path.sep + '..' 537 536 py_include_fullpath = py_include_minpath + path.sep + 'python' + `sys.version_info[0]` + '.' + `sys.version_info[1]` 538 537 539 538 # Construct the python bin path. 540 py_bin_minpath = sys.prefix+ path.sep + 'bin'539 py_bin_minpath = '@PREFIX@'+ path.sep + 'bin' 541 540 py_bin_fullpath = py_bin_minpath + path.sep + 'python' + `sys.version_info[0]` + '.' + `sys.version_info[1]` 542 541 543 542 # Get the numpy include path (for numpy/arrayobject.h). -
relax
old new 1 #! /usr/bin/env python1 #!@PREFIX@/bin/python2.7 2 2 3 3 # Import the relax module. 4 4 import relax -
scons/install.py
old new 113 113 ############### 114 114 115 115 # Run relax to create the *.pyc files. 116 print("\nCreating the byte-compiled *.pyc files.")117 python_path = sys.prefix + path.sep + 'bin' + path.sep + 'python' + `sys.version_info[0]` + '.' + `sys.version_info[1]`118 cmd = "cd %s; %s -m compileall . ; %s -O -m compileall ." % (env['RELAX_PATH'], python_path, python_path)119 print(cmd)120 system(cmd)116 #print("\nCreating the byte-compiled *.pyc files.") 117 #python_path = sys.prefix + path.sep + 'bin' + path.sep + 'python' + `sys.version_info[0]` + '.' + `sys.version_info[1]` 118 #cmd = "cd %s; %s -m compileall . ; %s -O -m compileall ." % (env['RELAX_PATH'], python_path, python_path) 119 #print(cmd) 120 #system(cmd) 121 121 122 122 # Final printout. 123 123 print("\n\n\n") -
dep_check.py
old new 142 142 try: 143 143 import scipy 144 144 scipy_module = True 145 except ImportError:145 except: 146 146 scipy_module = False 147 147 148 148 # Numeric python package check. … … 157 157 from Scientific.Visualization import VMD # This requires Numeric to be installed (at least in Scientific 2.7.8). 158 158 del VMD 159 159 vmd_module = True 160 except ImportError:160 except: 161 161 vmd_module = False 162 162 163 163 # mpi4py. … … 217 217 # ctypes module. 218 218 try: 219 219 import ctypes 220 from ctypes import Structure221 220 ctypes_module = True 222 221 except ImportError: 223 222 message = sys.exc_info()[1] 224 223 ctypes_module = False 225 224 ctypes_module_message = message.args[0] 225 try: 226 from ctypes import Structure 227 ctypes_structure_module = True 228 except ImportError: 229 message = sys.exc_info()[1] 230 ctypes_structure_module = False 231 ctypes_structure_module_message = message.args[0] 232 226 233 227 234 228 235 -
info.py
old new 28 28 # Python module imports. 29 29 if dep_check.ctypes_module: 30 30 import ctypes 31 from ctypes import Structure32 31 if hasattr(ctypes, 'windll'): 33 32 import ctypes.wintypes 34 33 else: 35 34 ctypes = None 35 if dep_check.ctypes_structure_module: 36 from ctypes import Structure 37 else: 36 38 Structure = object 37 39 import numpy 38 40 from os import environ, waitpid