Ticket #37630: relax.patch

File relax.patch, 3.9 KB (added by howarth@…, 12 years ago)

revised relax.patch for 2.1.2

  • sconstruct

    old new  
    100100    SYS = SYSTEM
    101101
    102102    # Mac OS X installation path.
    103     INSTALL_PATH = sys.prefix + sep + 'local'
     103    INSTALL_PATH = '@DEST_ROOT@@PREFIX@' + sep + 'lib'
    104104
    105105
    106106# All other operating systems.
     
    120120RELAX_PATH = INSTALL_PATH + sep + 'relax'
    121121
    122122# Installation path for binaries.
    123 BIN_PATH = INSTALL_PATH + sep + 'bin'
     123BIN_PATH = '@DEST_ROOT@@PREFIX@' + sep + 'bin'
    124124
    125125# Symbolic link installation path.
    126126SYMLINK = BIN_PATH + sep + 'relax'
    127127
    128128
    129 
    130129# The distribution files.
    131130#########################
    132131
     
    533532                 'relax_fit.c']
    534533
    535534        # 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 + '..'
    537536        py_include_fullpath = py_include_minpath + path.sep + 'python' + `sys.version_info[0]` + '.' + `sys.version_info[1]`
    538537
    539538        # Construct the python bin path.
    540         py_bin_minpath = sys.prefix + path.sep + 'bin'
     539        py_bin_minpath = '@PREFIX@'+ path.sep + 'bin'
    541540        py_bin_fullpath = py_bin_minpath + path.sep + 'python' + `sys.version_info[0]` + '.' + `sys.version_info[1]`
    542541
    543542        # Get the numpy include path (for numpy/arrayobject.h).
  • relax

    old new  
    1 #! /usr/bin/env python
     1#!@PREFIX@/bin/python2.7
    22
    33# Import the relax module.
    44import relax
  • scons/install.py

    old new  
    113113    ###############
    114114
    115115    # 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)
    121121
    122122    # Final printout.
    123123    print("\n\n\n")
  • dep_check.py

    old new  
    142142try:
    143143    import scipy
    144144    scipy_module = True
    145 except ImportError:
     145except:
    146146    scipy_module = False
    147147
    148148# Numeric python package check.
     
    157157    from Scientific.Visualization import VMD    # This requires Numeric to be installed (at least in Scientific 2.7.8).
    158158    del VMD
    159159    vmd_module = True
    160 except ImportError:
     160except:
    161161    vmd_module = False
    162162
    163163# mpi4py.
     
    217217# ctypes module.
    218218try:
    219219    import ctypes
    220     from ctypes import Structure
    221220    ctypes_module = True
    222221except ImportError:
    223222    message = sys.exc_info()[1]
    224223    ctypes_module = False
    225224    ctypes_module_message = message.args[0]
     225try:
     226    from ctypes import Structure
     227    ctypes_structure_module = True
     228except ImportError:
     229    message = sys.exc_info()[1]
     230    ctypes_structure_module = False
     231    ctypes_structure_module_message = message.args[0]
     232
    226233
    227234
    228235
  • info.py

    old new  
    2828# Python module imports.
    2929if dep_check.ctypes_module:
    3030    import ctypes
    31     from ctypes import Structure
    3231    if hasattr(ctypes, 'windll'):
    3332        import ctypes.wintypes
    3433else:
    3534    ctypes = None
     35if dep_check.ctypes_structure_module:
     36    from ctypes import Structure
     37else:
    3638    Structure = object
    3739import numpy
    3840from os import environ, waitpid