Changeset 2a8b4756 in sasview


Ignore:
Timestamp:
Apr 10, 2017 10:21:10 AM (8 years ago)
Author:
Ricardo Ferraz Leal <ricleal@…>
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.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
0505fce
Parents:
c04fb72
Message:

fixing package resources for OSx

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasview/logger_config.py

    rc04fb72 r2a8b4756  
    5656        ''' 
    5757        ''' 
    58         for filepath in [ 
    59                 os.path.join(os.path.abspath(os.path.dirname(__file__)), filename), 
    60                 pkg_resources.resource_filename(__name__, filename), 
    61             ]: 
     58        places_to_look_for_conf_file = [ 
     59            os.path.join(os.path.abspath(os.path.dirname(__file__)), filename), 
     60            os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", filename), 
     61            os.path.join(os.path.abspath(os.path.dirname(__file__)), "..", "..", filename), 
     62        ] 
     63 
     64        # To avoid the exception in OSx 
     65        # NotImplementedError: resource_filename() only supported for .egg, not .zip 
     66        try: 
     67            places_to_look_for_conf_file.append( 
     68                pkg_resources.resource_filename(__name__, filename)) 
     69        except NotImplementedError: 
     70            pass 
     71 
     72        for filepath in places_to_look_for_conf_file: 
    6273            if os.path.exists(filepath): 
    6374                self.config_file = filepath 
  • setup.py

    rf3bf622 r2a8b4756  
    312312package_data['sas.sasview'] = ['images/*', 
    313313                               'media/*', 
     314                               'logging.ini', 
    314315                               'test/*.txt', 
    315316                               'test/1d_data/*', 
Note: See TracChangeset for help on using the changeset viewer.