Changeset ceb89ac in sasview for prview/build_prview.py


Ignore:
Timestamp:
Jul 4, 2009 5:26:14 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:
e7b1ccf
Parents:
96c430d
Message:

prview: cleaned up build script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • prview/build_prview.py

    r96c430d rceb89ac  
    1515# 
    1616# Usage: 
    17 # python build_sansview [command] 
     17# python build_prview [command] 
    1818# [command] can be any of the following: 
    1919#   -h: lists the command line options 
    20 #   -r: Builds a SansView using the released modules. 
    21 #   -t: Builds SansView from the trunk. 
     20#   -r: Builds a PrView using the released modules. 
     21#   -t: Builds PrView from the trunk. 
    2222#   -i: Builds an installer from the release version. 
    2323#   -n: Print out the dependencies for the release notes 
     
    167167        os.system("%s checkout -q svn://danse.us/sans/trunk/prview" % SVN) 
    168168     
    169 def prepare(wipeout = False): 
     169def prepare(wipeout = False, install_folder=INSTALL_FOLDER): 
    170170    """ 
    171171        Prepare the build 
     
    187187         
    188188    # Create a fresh installation folder 
    189     if os.path.isdir(INSTALL_FOLDER): 
    190         shutil.rmtree(INSTALL_FOLDER) 
    191  
    192     os.mkdir(INSTALL_FOLDER) 
     189    if os.path.isdir(install_folder): 
     190        shutil.rmtree(install_folder) 
     191 
     192    os.mkdir(install_folder) 
    193193     
    194194    # Check that the dependencies are properly installed 
     
    196196     
    197197    # Move to the installation folder 
    198     os.chdir(INSTALL_FOLDER)     
     198    os.chdir(install_folder)     
    199199 
    200200def warning(): 
     
    218218    print "Build script for PrView %s" % PRVIEW 
    219219     
     220    #TODO: add --prefix option 
     221     
    220222    if len(sys.argv)==1: 
    221         # If there is no argument, build the installer 
    222         sys.argv.append("-i") 
    223          
    224     if len(sys.argv)>1: 
     223        # By default, build release version in site-packages without cleanup 
     224        logging.info("Building release version") 
     225        prepare(install_folder="prview") 
     226        checkout(True) 
     227         
     228    elif len(sys.argv)>1: 
    225229        # Help 
    226230        if sys.argv[1]=="-h": 
Note: See TracChangeset for help on using the changeset viewer.