Changeset 082c565 in sasview for setup.py


Ignore:
Timestamp:
Jul 27, 2012 7:02:39 AM (7 years ago)
Author:
Kieran Campbell <kieranrcampbell@…>
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:
fd1aec6f
Parents:
48c547b
Message:

Added documentation for StarPolymer? model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • setup.py

    r7a211030 r082c565  
    217217smear_dir  = os.path.join("sansmodels", "src", "c_smearer") 
    218218wrapper_dir  = os.path.join("sansmodels", "src", "python_wrapper", "generated") 
     219model_dir = os.path.join("sansmodels", "src", "sans","models") 
     220 
    219221if os.path.isdir(wrapper_dir): 
    220222    for file in os.listdir(wrapper_dir):  
     
    225227sys.path.append(os.path.join("sansmodels", "src", "python_wrapper")) 
    226228from wrapping import generate_wrappers 
    227 generate_wrappers(header_dir=includedir,  
    228                   output_dir=os.path.join("sansmodels", "src", "sans", "models"),  
    229                   c_wrapper_dir=wrapper_dir) 
     229generate_wrappers(header_dir = includedir,  
     230                  output_dir = model_dir, 
     231                  c_wrapper_dir = wrapper_dir) 
    230232 
    231233IGNORED_FILES = [".svn"] 
     
    265267 
    266268package_dir["sans"] = os.path.join("sansmodels", "src", "sans") 
    267 package_dir["sans.models"] = os.path.join("sansmodels", "src", "sans", "models") 
     269package_dir["sans.models"] = model_dir 
     270 
    268271package_dir["sans.models.sans_extension"] = os.path.join("sansmodels", "src", "sans", "models", "sans_extension") 
    269272             
     
    273276smearer_sources = [os.path.join(smear_dir, "smearer.cpp"), 
    274277                  os.path.join(smear_dir, "smearer_module.cpp")] 
     278 
     279# compile list of installed models 
     280installed_model_file = open(os.path.join("sansmodels", 
     281                                         "installed_models.txt"),'w') 
     282not_models = ['BaseComponent', 
     283              'sans_extension', 
     284              'MulComponent', 
     285              'svn', 
     286              'media', 
     287              'SubComponent', 
     288              '__init__', 
     289              'dispersion_models', 
     290              'AddComponent', 
     291              'qsmearing'] 
     292 
     293for model in os.listdir(model_dir): 
     294    if not model.rstrip(".py") in not_models: 
     295        installed_model_file.write(model.rstrip(".py") + '\n') 
     296 
     297installed_model_file.close() 
    275298 
    276299if os.name=='nt': 
     
    312335else: 
    313336    required.extend(['pil']) 
     337 
     338 
     339 
    314340    
    315341 # Set up SansView     
Note: See TracChangeset for help on using the changeset viewer.