Changeset 899e084 in sasview for sasview/setup_exe.py


Ignore:
Timestamp:
Jun 27, 2016 7:36:41 AM (5 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:
80c2c85
Parents:
efe730d
Message:

build console app as well as gui

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasview/setup_exe.py

    refe730d r899e084  
    3333root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 
    3434platform = '%s-%s'%(get_platform(), sys.version[:3]) 
    35 build_path = os.path.join(root, 'build', 'lib.'+platform) 
    36 #build_path = os.path.join(root, 'sasview-install', 'Lib', 'site-packages') 
     35build_path = os.path.join(root, 'sasview-install', 'Lib', 'site-packages') 
    3736sys.path.insert(0, build_path) 
     37doc_path = os.path.join(root, 'build', 'lib.'+platform, 'doc') 
    3838 
    3939from sas.sasview import local_config 
     
    279279 
    280280# See if the documentation has been built, and if so include it. 
    281 doc_path = os.path.join(build_path, "doc") 
    282281if os.path.exists(doc_path): 
    283282    for dirpath, dirnames, filenames in os.walk(doc_path): 
     
    314313    ]) 
    315314packages.append('periodictable.core') # not found automatically 
    316 #packages.append('IPython') 
     315# For an interactive interpreter, SasViewCom 
     316packages.extend(['IPython','pyreadline','pyreadline.unicode_helper']) 
     317 
     318# individual models 
    317319includes = ['site', 'lxml._elementpath', 'lxml.etree'] 
    318320 
     
    329331    'tcl84.dll', 'tk84.dll', 'QtGui4.dll', 'QtCore4.dll', 
    330332    # numpy 1.8 openmp bindings (still seems to use all the cores without them) 
    331     'libiomp5md.dll', 'libifcoremd.dll', 'libmmd.dll', 'svml_dispmd.dll','libifportMD.dll', 
     333    # ... but we seem to need them when building from anaconda, so don't exclude ... 
     334    #'libiomp5md.dll', 'libifcoremd.dll', 'libmmd.dll', 'svml_dispmd.dll','libifportMD.dll', 
    332335    # microsoft C runtime (not allowed to ship with the app; need to ship vcredist 
    333336    'msvcp90.dll', 
     
    340343    ] 
    341344 
     345# extra dlls not found automatically 
     346python_root = os.path.dirname(os.path.abspath(sys.executable)) 
     347dll_path = os.path.join(python_root, 'Library', 'bin') 
     348# the following are found already: 'mkl_intel_thread', 'libmmd', 'libifcoremd' 
     349dll_includes = ['mkl_core', 'mkl_def', 'libiomp5md'] 
     350dll_includes = [os.path.join(dll_path, dll+'.dll') for dll in dll_includes] 
     351dll_includes = [dll for dll in dll_includes if os.path.exists(dll)] 
     352if dll_includes: 
     353   DATA_FILES.append(('.', dll_includes)) 
     354 
    342355target_wx_client = Target( 
    343356    description = 'SasView', 
    344     script = 'startup.py', 
     357    script = 'sasview_gui.py', 
    345358    icon_resources = [(1, local_config.SetupIconFile_win)], 
    346359    other_resources = [(24, 1, manifest)], 
    347360    dest_base = "SasView" 
    348361    ) 
     362 
     363target_console_client = Target( 
     364    description = 'SasView console', 
     365    script = 'sasview_console.py', 
     366    icon_resources = [(1, local_config.SetupIconFile_win)], 
     367    other_resources = [(24, 1, manifest)], 
     368    dest_base = "SasViewCom" 
     369) 
    349370 
    350371bundle_option = 2 
     
    358379setup( 
    359380    windows=[target_wx_client], 
    360     console=[], 
     381    console=[target_console_client], 
    361382    options={ 
    362383        'py2exe': { 
Note: See TracChangeset for help on using the changeset viewer.