Changeset 2a8b4756 in sasview


Ignore:
Timestamp:
Apr 10, 2017 10:21:10 AM (8 months ago)
Author:
Ricardo Ferraz Leal <ricleal@…>
Branches:
master, ESS_GUI, ESS_GUI_CategroyManager, ESS_GUI_Pr, ESS_GUI_cns, ESS_GUI_corf, ESS_GUI_py2_OLD, SVCC-1, SasView-664, costrafo411, docs, ticket-873, ticket-976, ticket-993, 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.