Changeset 5a405bd in sasview


Ignore:
Timestamp:
Sep 20, 2017 7:26:17 PM (7 years ago)
Author:
Paul Kienzle <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, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
1693141
Parents:
6e50a8d
Message:

bundle resource files by directory

Location:
src/sas/sasgui
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/__init__.py

    r959eb01 r5a405bd  
    1414    # Check for data path next to exe/zip file. 
    1515    # If we are inside a py2exe zip file, we need to go up 
    16     # to get to the directory containing  
     16    # to get to the directory containing 
    1717    # the media for this module 
    1818    path = os.path.dirname(__file__) 
     
    2727                return module_media_path 
    2828            return media_path 
    29     
     29 
    3030    raise RuntimeError('Could not find guiframe images files') 
    3131 
     
    4040    # Check for data path next to exe/zip file. 
    4141    # If we are inside a py2exe zip file, we need to go up 
    42     # to get to the directory containing  
     42    # to get to the directory containing 
    4343    # the media for this module 
    4444    path = os.path.dirname(__file__) 
     
    5858    """ 
    5959    Return the data files associated with guiframe images . 
    60      
     60 
    6161    The format is a list of (directory, [files...]) pairs which can be 
    6262    used directly in setup(...,data_files=...) for setup.py. 
     
    6464    """ 
    6565    data_files = [] 
    66     path = get_data_path(media="images") 
    67     for f in findall(path): 
    68         data_files.append(('images/icons', [f])) 
    69     path = get_media_path(media="media") 
    70     for f in findall(path): 
    71         data_files.append(('media/guiframe_media', [f])) 
     66    data_files.append(('images/icons', findall(get_data_path("images")))) 
     67    data_files.append(('media/guiframe_media', findall(get_data_path("media")))) 
    7268 
    7369    return data_files 
  • src/sas/sasgui/perspectives/calculator/__init__.py

    r959eb01 r5a405bd  
    1818    path = os.path.dirname(__file__) 
    1919    #Look for maximum n_dir up of the current dir to find media 
    20     
     20 
    2121    #for i in range(n_dir): 
    2222    i = 0 
     
    3030             return media_path 
    3131        i += 1 
    32     
     32 
    3333    raise RuntimeError('Could not find calculator media files') 
    3434 
     
    3636    """ 
    3737    Return the data files associated with media calculator. 
    38      
     38 
    3939    The format is a list of (directory, [files...]) pairs which can be 
    4040    used directly in setup(...,data_files=...) for setup.py. 
     
    4242    """ 
    4343    data_files = [] 
    44     path = get_data_path(media="media") 
    45     for f in findall(path): 
    46         data_files.append(('media/calculator_media', [f])) 
     44    data_files.append(('media/calculator_media', findall(get_data_path("media")))) 
    4745    return data_files 
  • src/sas/sasgui/perspectives/fitting/__init__.py

    r959eb01 r5a405bd  
    1313    # Check for data path next to exe/zip file. 
    1414    # If we are inside a py2exe zip file, we need to go up 
    15     # to get to the directory containing  
     15    # to get to the directory containing 
    1616    # the media for this module 
    1717    path = os.path.dirname(__file__) 
     
    2626                return module_media_path 
    2727            return media_path 
    28     
     28 
    2929    raise RuntimeError('Could not find models media files') 
    3030 
     
    3232    """ 
    3333    Return the data files associated with media. 
    34      
     34 
    3535    The format is a list of (directory, [files...]) pairs which can be 
    3636    used directly in setup(...,data_files=...) for setup.py. 
     
    3838    """ 
    3939    data_files = [] 
    40     path = os.path.dirname(__file__) 
    41     p_path = os.path.join(path, 'plugin_models') 
    42     for f in findall(p_path): 
    43         data_files.append(('plugin_models', [f])) 
    44     # path = get_data_path(media="media") 
    45     for f in findall(path): 
    46         data_files.append(('media/fitting_media', [f])) 
    47      
     40    # plugin_models = os.path.join(os.path.dirname(__file__), "plugin_models") 
     41    # data_files.append('plugin_models', findall(plugin_models))) 
     42    data_files.append(('media/fitting_media', findall(get_data_path("media")))) 
     43 
    4844    return data_files 
  • src/sas/sasgui/perspectives/invariant/__init__.py

    r959eb01 r5a405bd  
    1515    # Check for data path next to exe/zip file. 
    1616    # If we are inside a py2exe zip file, we need to go up 
    17     # to get to the directory containing  
     17    # to get to the directory containing 
    1818    # the media for this module 
    1919    path = os.path.dirname(__file__) 
     
    2828                return module_media_path 
    2929            return media_path 
    30     
     30 
    3131    raise RuntimeError('Could not find invariant media files') 
    3232 
     
    3434    """ 
    3535    Return the data files associated with media invariant. 
    36      
     36 
    3737    The format is a list of (directory, [files...]) pairs which can be 
    3838    used directly in setup(...,data_files=...) for setup.py. 
     
    4040    """ 
    4141    data_files = [] 
    42     path = get_data_path(media="media") 
    43     for f in findall(path): 
    44         data_files.append(('media/invariant_media', [f])) 
     42    data_files.append(('media/invariant_media', findall(get_data_path("media")))) 
    4543    return data_files 
Note: See TracChangeset for help on using the changeset viewer.