Changeset 499639c in sasview for run.py


Ignore:
Timestamp:
Apr 21, 2014 3:30:26 PM (5 years ago)
Author:
pkienzle
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
6f87cc1
Parents:
85f17f6
Message:

use platform specific filename for compiled extension in run.py rather than generic glob expansion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • run.py

    r95d58d3 r499639c  
    5252    return mod 
    5353 
    54 def import_dll(modname): 
     54def import_dll(modname, build_path): 
    5555    """Import a DLL from the build directory""" 
     56    import sysconfig 
     57    ext = sysconfig.get_config_var('SO') 
    5658    # build_path comes from context 
    57     path = glob(joinpath(build_path, *modname.split('.'))+'.*')[0] 
     59    path = joinpath(build_path, *modname.split('.'))+ext 
    5860    #print "importing", modname, "from", path 
    5961    return imp.load_dynamic(modname, path) 
     
    113115    sans.pr.core = import_package('sans.pr.core', 
    114116                                  joinpath(build_path, 'sans', 'pr', 'core')) 
    115     #import_dll('park._modeling') 
     117    #import_dll('park._modeling', build_path) 
    116118 
    117119    #park = import_package('park',os.path.join(build_path,'park')) 
Note: See TracChangeset for help on using the changeset viewer.