Changeset 4745


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

more work on install for OSX

Location:
install
Files:
3 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*'*')
  • install/g2complete/src/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*'*')
  • install/g2full/g2postinstall.sh

    r4740 r4745  
    1010# "install" the GSAS-II package (create shortcuts, byte-compile...)
    1111#
    12 $PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --nonet > $PREFIX/GSASII/conda_inst.log 2>&1
     12echo "launching bootstrap process"
     13#$PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --nonet > $PREFIX/GSASII/conda_inst.log 2>&1
     14$PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --nonet 2> $PREFIX/GSASII/conda_postinst.log
    1315# Now try to update to latest GSAS-II version (will fail if no network)
    14 $PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --noinstall >> $PREFIX/GSASII/conda_inst.log 2>&1
     16#$PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --noinstall >> $PREFIX/GSASII/conda_inst.log 2>&1
     17$PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --noinstall 2>> $PREFIX/GSASII/conda_postinst.log
    1518#
    1619# create start script
     
    2629#$PREFIX/bin/python $PREFIX/GSASII/makeMacApp.py
    2730#$PREFIX/bin/python $PREFIX/GSASII/makeLinux.py
    28 echo "GSAS-II bootstrap completed" >> $PREFIX/.messages.txt
     31echo "GSAS-II bootstrap completed"
Note: See TracChangeset for help on using the changeset viewer.