Changeset 4745 for install/bootstrap.py


Ignore:
Timestamp:
Jan 7, 2021 9:42:11 PM (10 months ago)
Author:
toby
Message:

more work on install for OSX

File:
1 edited

Legend:

Unmodified
Added
Removed
  • install/bootstrap.py

    r4743 r4745  
    272272
    273273def svncleanup(spath):
    274     cmd = [svn, 'cleanup', spath]
    275     s = subprocess.Popen(cmd,stderr=subprocess.PIPE)
    276     out,err = MakeByte2str(s.communicate())
    277     if err:
    278         print('subversion cleanup returned an error:')
    279         if out: print(out)
    280         if err: print(err)
    281274    svntmp = os.path.join(spath,'.svn','tmp')
    282275    if not os.path.exists(svntmp):
     
    285278        s = subprocess.Popen(cmd,stderr=subprocess.PIPE)
    286279        out,err = MakeByte2str(s.communicate())
     280        if out: print(out)
     281        if err: print(err)
     282    cmd = [svn, 'cleanup', spath]
     283    s = subprocess.Popen(cmd,stderr=subprocess.PIPE)
     284    out,err = MakeByte2str(s.communicate())
     285    if err:
     286        print('subversion cleanup returned an error:')
    287287        if out: print(out)
    288288        if err: print(err)
     
    497497if not skipDownloadSteps:
    498498    # patch: switch GSAS-II location if linked to XOR server (relocated May/June 2017)
    499     cmd = [svn, 'info']
     499    cmd = [svn, 'info',path2GSAS2]
    500500    p = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
    501501    res,err = p.communicate()
     
    503503        print('Switching previous install with .xor. download location to\n\thttps://subversion.xray.aps.anl.gov/pyGSAS')
    504504        cmd = [svn, 'switch','--relocate','https://subversion.xor.aps.anl.gov/pyGSAS',
    505                'https://subversion.xray.aps.anl.gov/pyGSAS']
     505               'https://subversion.xray.aps.anl.gov/pyGSAS',path2GSAS2]
    506506        if proxycmds: cmd += proxycmds
    507507        p = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
     
    512512            print(res)
    513513    # patch: switch GSAS-II location if switched to 2frame version (removed August 2017)
    514     if '2frame' in str(res):
     514    elif '2frame' in str(res):
    515515        print('Switching previous 2frame install to trunk\n\thttps://subversion.xray.aps.anl.gov/pyGSAS')
    516516        cmd = [svn, 'switch',g2home + '/trunk',path2GSAS2,
     
    524524            print(err)
    525525            print(res)
     526    elif 'not a working' not in str(res):
     527        svncleanup(path2GSAS2)
    526528
    527529    print('\n'+75*'*')
Note: See TracChangeset for help on using the changeset viewer.