Author: semor Date: Tue Feb 17 18:30:23 2009 New Revision: 8816 URL: http://svn.gna.org/viewcvs/relax?rev=8816&view=rev Log: Reverted r8706. This was proposed by Ed in a post at: https://mail.gna.org/public/relax-devel/2009-02/msg00007.html (Message-id: <7f080ed10902170918l1dd302b5q744ec9ecdc570e1b@xxxxxxxxxxxxxx>) The command used was: svn merge -r8706:8705 . Modified: branches/relax_disp/dep_check.py branches/relax_disp/sconstruct Modified: branches/relax_disp/dep_check.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/dep_check.py?rev=8816&r1=8815&r2=8816&view=diff ============================================================================== --- branches/relax_disp/dep_check.py (original) +++ branches/relax_disp/dep_check.py Tue Feb 17 18:30:23 2009 @@ -118,29 +118,6 @@ # Compiled C modules. ##################### -# Relaxation dispersion curve fitting. -try: - from maths_fns.relax_disp import setup - del setup - C_module_exp_fn = True -except ImportError, message: - # The OS. - system = platform.system() - - # Does the compiled file exist. - file = 'relax_disp.so' - if system == 'Windows' or system == 'Microsoft': - file = 'relax_disp.pyd' - if not access('maths_fns' + sep + file, F_OK): - C_module_exp_fn_mesg = "ImportError: relaxation dispersion curve fitting is unavailable, the corresponding C modules have not been compiled." - - # Show the full error. - else: - C_module_exp_fn_mesg = "ImportError: " + message[0] + "\nRelaxation dispersion curve fitting is unavailable, try compiling the C modules." - - # Set the flag. - C_module_exp_fn = False - # Relaxation curve fitting. try: from maths_fns.relax_fit import setup Modified: branches/relax_disp/sconstruct URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/sconstruct?rev=8816&r1=8815&r2=8816&view=diff ============================================================================== --- branches/relax_disp/sconstruct (original) +++ branches/relax_disp/sconstruct Tue Feb 17 18:30:23 2009 @@ -176,8 +176,7 @@ # Setup the rules for building the relaxation curve fitting C modules (and set it as the default). self.relax_fit() - self.relax_disp() - Default(self.relax_fit_object, self.relax_disp_object) + Default(self.relax_fit_object) @@ -211,8 +210,7 @@ binary_dist_env = Environment(BUILDERS={'dummy' : Builder(action=self.dummy)}) binary_dist_env.dummy(target='binary_dist', source=None) binary_dist_env.Depends('binary_dist', 'version_check') # First check the program version number. - binary_dist_env.Depends('binary_dist', self.relax_disp_object) # Compile the C code for relaxation dispersion curve fitting. - binary_dist_env.Depends('binary_dist', self.relax_fit_object) # Compile the C code for relaxation curve fitting. + binary_dist_env.Depends('binary_dist', self.relax_fit_object) # Compile the C code. binary_dist_env.Depends('binary_dist', 'manual_clean_nodeps') # Clean up the temporary manual files. binary_dist_env.Depends('binary_dist', 'clean') # Then clean up all other temporary files. binary_dist_env.Depends('binary_dist', 'package_bin') # Package the binary distribution. @@ -465,72 +463,6 @@ Help(string) - def relax_disp(self): - """Function for setting up scons for building the relaxation dispersion curve fitting C modules.""" - - # The directory. - dir = 'maths_fns' - - # File names. - files = ['dispersion.c', - 'relax_disp.c'] - - # Construct the python include path (for Python.h). - py_include_minpath = sys.prefix + path.sep + 'include' - py_include_fullpath = py_include_minpath + path.sep + 'python' + `sys.version_info[0]` + '.' + `sys.version_info[1]` - - # Get the numpy include path (for numpy/arrayobject.h). - numpy_path = get_include() - - # C flags. - if SYSTEM == 'Windows': - cflags = '/nologo /I\"' + py_include_minpath + '\" /I\"' + numpy_path + '\"' - else: - cflags = '-I' + py_include_fullpath + ' -I' + numpy_path - - # Relaxation dispersion curve fitting build environment. - env = Environment() - - # Python library path. - libpath = '' - if SYSTEM == 'Windows': - libpath = sys.prefix + path.sep + 'libs' - - # Add the python library path to the environment. - env.Append(LIBPATH = libpath) - - # Catch Mac OS X and send the correct command line options to the linker (these may become redundant as SCons improves). - if env['PLATFORM'] == 'darwin': - env.Append(LINKFLAGS = ['-bundle', '-bundle_loader', sys.prefix + path.sep + 'bin' + path.sep + 'python', '-dynamic']) - env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS') - - # Shared library prefix and suffix. - prefix = '' - suffix = '.so' - if SYSTEM == 'Windows': - suffix = '.pyd' - - # Loop over the relaxation dispersion curve fitting files. - nodes = [] - for file in files: - nodes.append(env.SharedObject(dir + path.sep + file, CCFLAGS=cflags)) - - # Build the relaxation dispersion curve fitting module. - self.relax_disp_object = env.SharedLibrary(target=dir + path.sep + 'relax_disp', source=nodes, SHLIBPREFIX=prefix, SHLIBSUFFIX=suffix) - - # Print out string returning function. - def print_string(target, source, env): - string = "\n\n\n\n" - string = string + "###########################\n" - string = string + "# Compiling the C modules #\n" - string = string + "###########################\n\n\n" - string = string + "Building the relaxation dispersion curve fitting module " + `str(self.relax_disp_object[0])` + "\n" - return string - - # Add the print out as an action to take before constructing the first object. - env.AddPreAction(nodes[0], Action(self.dummy, print_string)) - - def relax_fit(self): """Function for setting up scons for building the relaxation curve fitting C modules."""