Changeset d3d955e in sasview for sansview


Ignore:
Timestamp:
Apr 28, 2010 5:19:00 PM (15 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
91f151a
Parents:
017ec0b7
Message:

sansview: updated build script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/build_sansview.py

    rd1b43cd rd3d955e  
    3434import time 
    3535timestamp = int(time.time()) 
     36CWD    = os.getcwd() 
     37 
    3638INSTALL_FOLDER = "install_%s" % str(timestamp) 
     39LIB_FOLDER = "%s\%s" % (CWD, INSTALL_FOLDER) 
    3740 
    3841logging.basicConfig(level=logging.INFO, 
     
    4144                    filemode='w') 
    4245 
    43 CWD    = os.getcwd() 
    4446 
    4547# On Windows, the python executable is not always on the path. 
     
    5355INNO   = "\"c:\Program Files\Inno Setup 5\ISCC\"" 
    5456 
    55 # Release version 1.0.0 
    56 SANSMODELS = "0.4.5" 
    57 DATALOADER = "0.2.5" 
    58 GUICOMM    = "0.1.3" 
    59 GUIFRAME   = "0.1.8" 
    60 SANSVIEW   = "1.0.0" 
    61 PLOTTOOLS  = "0.1.7" 
    62 UTIL       = "0.1.3" 
    63 PARK       = "1.2" 
    64 PARK_INTEG = "0.1.3" 
     57# Release version 1.3.0 
     58SANSMODELS = "0.4.6" 
     59DATALOADER = "0.2.6" 
     60GUICOMM    = "0.1.4" 
     61GUIFRAME   = "0.1.9" 
     62SANSVIEW   = "1.3.0" 
     63PLOTTOOLS  = "0.1.8" 
     64UTIL       = "0.1.4" 
     65PARK       = "1.2" # May need update 
     66PARK_INTEG = "0.1.4" 
    6567PRVIEW     = "0.3.1" 
    66 PR_INV     = "0.2.3" 
     68PR_INV     = "0.2.4" 
     69CALCULATOR = "0.1.0" 
     70CALC_VIEW  = "0.1.0" 
     71INVARIANT  = "0.1.0" 
     72INV_VIEW   = "0.1.0" 
     73THEORY_VIEW= "0.1.0" 
     74ELEMENTS = "1.0.2" 
    6775 
    6876# URLs for SVN repos 
     
    7886PRVIEW_URL = "svn://danse.us/sans/releases/prview-%s" % PRVIEW 
    7987PR_INV_URL = "svn://danse.us/sans/releases/pr_inversion-%s" % PR_INV 
    80  
     88CALC_URL = "svn://danse.us/sans/releases/calculator-%s" % CALCULATOR 
     89CALC_VIEW_URL = "svn://danse.us/sans/releases/calculatorview-%s" % CALC_VIEW 
     90INV_URL = "svn://danse.us/sans/releases/Invariant-%s" % INVARIANT 
     91INV_VIEW_URL = "svn://danse.us/sans/releases/invariantview-%s" % INV_VIEW 
     92THEO_VIEW_URL = "svn://danse.us/sans/releases/theoryview-%s" % THEORY_VIEW 
     93ELEMENTS_URL = "svn://danse.us/common/elements/releases/elements-%s" % ELEMENTS 
    8194 
    8295def check_system(): 
     
    115128        @param url: URL of the SVN repo 
    116129    """ 
    117     if not os.path.isdir(install_dir): 
    118         os.mkdir(install_dir) 
    119     os.chdir(install_dir)    
    120     os.system("%s checkout -q %s" % (SVN, url))         
    121     os.chdir(setup_dir) 
    122     os.system("%s setup.py -q build -cmingw32" % PYTHON) 
    123     os.system("%s setup.py -q install" % PYTHON) 
     130    logging.info("Installing %s" % url) 
     131    try: 
     132        if not os.path.isdir(install_dir): 
     133            os.mkdir(install_dir) 
     134        os.chdir(install_dir)    
     135        os.system("%s checkout -q %s" % (SVN, url))         
     136        os.chdir(setup_dir) 
     137        if sys.platform == 'win32': 
     138            os.system("%s setup.py -q build -cmingw32" % PYTHON) 
     139        else: 
     140            os.system("%s setup.py -q build" % PYTHON) 
     141        os.system("%s setup.py -q install --root \"%s\"" % (PYTHON, LIB_FOLDER)) 
     142    except: 
     143        logging.error("Install failed for %s" % url) 
     144        logging.error(sys.exc_value) 
     145        raw_input("Press enter to continue\n") 
     146        sys.exit() 
    124147     
    125148def checkout(release=False): 
     
    185208    os.chdir(wd) 
    186209    if release: 
    187         pass 
     210        install_pkg(".", "Invariant-%s" % INVARIANT, INV_URL) 
    188211    else: 
    189212        install_pkg(".", "Invariant", "svn://danse.us/sans/trunk/Invariant") 
     
    191214    os.chdir(wd) 
    192215    if release: 
    193         pass 
     216        install_pkg(".", "invariantview-%s" % INV_VIEW, INV_VIEW_URL) 
    194217    else: 
    195218        install_pkg(".", "invariantview", "svn://danse.us/sans/trunk/invariantview") 
     
    197220    os.chdir(wd) 
    198221    if release: 
    199         pass 
     222        install_pkg(".", "calculatorview-%s" % CALC_VIEW, CALC_VIEW_URL) 
    200223    else: 
    201224        install_pkg(".", "calculatorview", "svn://danse.us/sans/trunk/calculatorview") 
     
    203226    os.chdir(wd) 
    204227    if release: 
    205         pass 
     228        install_pkg(".", "calculator-%s" % CALCULATOR, CALC_URL) 
    206229    else: 
    207230        install_pkg(".", "calculator", "svn://danse.us/sans/trunk/calculator") 
     
    209232    os.chdir(wd) 
    210233    if release: 
    211         pass 
     234        install_pkg(".", "theoryview-%s" % THEORY_VIEW, THEO_VIEW_URL) 
    212235    else: 
    213236        install_pkg(".", "theoryview", "svn://danse.us/sans/trunk/theoryview") 
    214237 
    215     #TODO: need a release version of PARK 
     238    os.chdir(wd) 
     239    if release: 
     240        #install_pkg(".", "elements-%s" % ELEMENTS, ELEMENTS_URL) 
     241        install_pkg("elements", "trunk", "svn://danse.us/common/elements/trunk") 
     242    else: 
     243        install_pkg("elements", "trunk", "svn://danse.us/common/elements/trunk") 
     244 
    216245    os.chdir(wd) 
    217246    if release: 
     
    229258    """ 
    230259        Prepare the build 
     260         
     261        @param wipeout: If True, the DANSE modules in the standard site-packages will be 
     262        removed to avoid conflicts. 
    231263    """ 
    232264    # Remove existing libraries 
    233265    if wipeout == True: 
    234         print "Deleting old modules" 
     266        logging.info("Deleting DANSES modules in site-packages") 
    235267        from distutils.sysconfig import get_python_lib 
    236268        libdir = get_python_lib() 
     
    326358                    logging.info("Building installer from release version") 
    327359                    os.chdir("sansview-%s" % (SANSVIEW)) 
    328                     os.system("%s setup_exe.py -q py2exe" % PYTHON) 
     360                    os.system("%s setup_exe.py -q py2exe --extrapath \"%s\python25\lib\site-packages\"" % (PYTHON, LIB_FOLDER)) 
    329361                    os.system("%s/Q installer.iss" % INNO) 
    330362                    shutil.copy2(os.path.join("Output","setupSansView.exe"),  
    331363                                 os.path.join(CWD, "setupSansView_%s.exe" % str(timestamp))) 
    332364                     
    333      
     365    raw_input("Press enter to continue\n") 
     366     
Note: See TracChangeset for help on using the changeset viewer.