Changeset 1002 for trunk/bindings/python


Ignore:
Timestamp:
01/07/08 16:47:30 (4 years ago)
Author:
Freddie Akeroyd
Message:
  • Fix for automake-1.10
  • nxs.py is now editied during the install process to contain the correct path to the NeXus library

Refs #101

Location:
trunk/bindings/python
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bindings/python/Makefile.am

    r1000 r1002  
    3131pydocdir        = $(NXDOCDIR)/python 
    3232pydoc_DATA      = README.html 
    33 python_PYTHON = nxs.py setup.py nxstest.py 
     33pkgpython_PYTHON = nxs.py setup.py nxstest.py 
    3434EXTRA_DIST      = README.html 
    3535 
    36 #install-data-hook : 
    37 #       python setup.py install --root=$(DESTDIR) 
     36install-data-hook : 
     37        sed -e "s|nxprefix = .*|nxprefix = \'${prefix}\'|" < ${srcdir}/nxs.py > $(DESTDIR)${pkgpythondir}/nxs.py 
     38 
     39# python setup.py install --root=$(DESTDIR) 
    3840 
    3941include $(top_srcdir)/build_rules.am 
  • trunk/bindings/python/nxs.py

    r999 r1002  
    185185    Load the NeXus library whereever it may be. 
    186186    """ 
     187    # this will get changed as part of the install process 
     188    # it should correspond to --prefix specified to ./configure 
     189    nxprefix = '/usr/local' 
    187190    # NEXUSLIB takes precedence 
    188191    if 'NEXUSLIB' in os.environ: 
     
    210213        # Search the load library path as well as the standard locations 
    211214        ldpath = [p for p in os.environ.get(ldenv,'').split(':') if p != ''] 
    212         stdpath = ['/usr/local/lib','/usr/lib'] 
     215        stdpath = [ nxprefix+'/lib', '/usr/local/lib', '/usr/lib'] 
    213216        files += [os.path.join(p,lib) for p in [filedir]+ldpath+stdpath] 
    214217 
Note: See TracChangeset for help on using the changeset viewer.