Changeset b81cf5c in sasview


Ignore:
Timestamp:
Jun 14, 2009 8:59:31 PM (16 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:
57acd41
Parents:
c405c69
Message:

sansview: modified builder

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sansview/build_sansview.py

    r138ac69 rb81cf5c  
    177177        os.system("%s checkout -q svn://danse.us/sans/trunk/sansview" % SVN) 
    178178     
    179 def prepare(): 
     179def prepare(wipeout = False): 
    180180    """ 
    181181        Prepare the build 
    182182    """ 
    183183    # Remove existing libraries 
    184     from distutils.sysconfig import get_python_lib 
    185     libdir = get_python_lib() 
    186     old_dirs = [os.path.join(libdir, 'danse'), 
    187                 os.path.join(libdir, 'data_util'), 
    188                 os.path.join(libdir, 'DataLoader'), 
    189                 os.path.join(libdir, 'park'), 
    190                 os.path.join(libdir, 'sans'), 
    191                 os.path.join(libdir, 'sans_extension'), 
    192                 ] 
    193     for d in old_dirs: 
    194         if os.path.isdir(d): 
    195             shutil.rmtree(d) 
    196      
     184    if wipeout == True: 
     185        print "Deleting old modules" 
     186        from distutils.sysconfig import get_python_lib 
     187        libdir = get_python_lib() 
     188        old_dirs = [os.path.join(libdir, 'danse'), 
     189                    os.path.join(libdir, 'data_util'), 
     190                    os.path.join(libdir, 'DataLoader'), 
     191                    os.path.join(libdir, 'park'), 
     192                    os.path.join(libdir, 'sans'), 
     193                    os.path.join(libdir, 'sans_extension'), 
     194                    ] 
     195        for d in old_dirs: 
     196            if os.path.isdir(d): 
     197                shutil.rmtree(d) 
     198         
    197199    # Create a fresh installation folder 
    198200    if os.path.isdir(INSTALL_FOLDER): 
     
    212214        Ask the user whether he wants to proceed. 
    213215    """ 
    214     print "WARNING!n" 
     216    print "WARNING!\n" 
    215217    print "In order to build a clean version of SansView, this script" 
    216218    print "deletes anything found under site-packages for the following" 
     
    222224    print "   - sans" 
    223225    print "   - sans_extension\n" 
    224     answer = raw_input("Are you sure you want to proceed? [Y|N]") 
     226    answer = raw_input("Do you want to delete those modules [Y] or continue with a dirty installation [N]? [Y|N]") 
    225227    return answer.upper()=="Y" 
    226228         
    227229if __name__ == "__main__":  
    228230    print "Build script for SansView %s" % SANSVIEW 
    229      
    230     # Make sure the user really wants to proceed 
    231     if not warning(): 
    232         print "Execution canceled"  
    233         sys.exit() 
    234231     
    235232    if len(sys.argv)==1: 
     
    261258        else: 
    262259            logging.info("Build script for SansView %s" % SANSVIEW) 
     260                     
    263261            # Prepare installation folder 
    264             prepare() 
     262            prepare(warning()) 
    265263             
    266264            # Check the command line argument 
Note: See TracChangeset for help on using the changeset viewer.