Changeset 4736 for install/g2complete


Ignore:
Timestamp:
Jan 7, 2021 3:53:49 PM (11 months ago)
Author:
toby
Message:

more install work

Location:
install/g2complete
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • install/g2complete/build.sh.template

    r4710 r4736  
    88mkdir -p $PREFIX/GSASII
    99cp $RECIPE_DIR/src/bootstrap.py $PREFIX/GSASII
    10 python $PREFIX/GSASII/bootstrap.py --binary=**npversion** > $PREFIX/conda_G2build_log.txt
     10python $PREFIX/GSASII/bootstrap.py --binary=**npversion** > $PREFIX/GSASII/conda_G2build_log.txt 2>&1
  • install/g2complete/post-link.sh

    r4715 r4736  
    11#!/bin/bash
    2 echo "Complete installation GSAS-II and update from APS subversion server, if on network" > $PREFIX/GSASII/conda_inst.log
    3 # create bootstrap script
    4 #echo "# Commands to run GSAS-II load/update process" > $CONDA_ROOT/start_G2_bootstrap.sh
    5 #echo "source $CONDA_ROOT/bin/activate $CONDA_DEFAULT_ENV" >> $CONDA_ROOT/start_G2_bootstrap.sh
    6 #echo "$PREFIX/bin/python $PREFIX/GSASII/bootstrap.py" >> $CONDA_ROOT/start_G2_bootstrap.sh
     2echo "Complete complete installation GSAS-II from APS subversion server" > $PREFIX/GSASII/conda_inst.log
     3# Note: for g2complete create scripts to access bootstrap & start are moved to g2postinstall.sh (g2full)
    74#
    85# "install" the GSAS-II package (create shortcuts, byte-compile...)
    96#
    10 $PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --nonet > /tmp/bootstrap1.log 2>> $PREFIX/GSASII/conda_inst.log 2>&1
     7$PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --nonet >> $PREFIX/GSASII/conda_inst.log 2>&1
    118# Now try to update to latest GSAS-II version (will fail if no network)
    12 $PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --noinstall > /tmp/bootstrap2.log 2>> $PREFIX/GSASII/conda_inst.log 2>&1
    13 # create start script
    14 #echo "# Commands to start GSAS-II" > $CONDA_ROOT/start_GSASII.sh
    15 #echo "source $CONDA_ROOT/bin/activate $CONDA_DEFAULT_ENV" >> $CONDA_ROOT/start_GSASII.sh
    16 #if [ -e $PREFIX/bin/pythonw ]
    17 #then
    18 #   echo "$PREFIX/bin/pythonw $PREFIX/GSASII/GSASII.py" >> $CONDA_ROOT/start_GSASII.sh
    19 #else
    20 #   echo "$PREFIX/bin/python $PREFIX/GSASII/GSASII.py" >> $CONDA_ROOT/start_GSASII.sh
    21 #fi
    22 #cp $PREFIX/GSASII/conda_inst.log $PREFIX/.messages.txt
    23 echo "GSAS-II bootstrap completed" > $PREFIX/.messages.txt
     9$PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --noinstall >> $PREFIX/GSASII/conda_inst.log 2>&1
     10cp $PREFIX/GSASII/conda_inst.log $PREFIX/.messages.txt
     11echo "GSAS-II bootstrap completed" >> $PREFIX/.messages.txt
  • install/g2complete/src/bootstrap.py

    r4732 r4736  
    1111skipInstallChecks = False  # if set to True, continue installation even if current Python lacks packages and
    1212                           # skips platform-dependent installation steps
     13                           #--> True: -noinstall or -binary=
    1314skipDownloadSteps = False  # if False, svn is used to download GSAS-II files and binaries
     15                           #--> True: -nonet
    1416skipProxy = False          # if False then the script creates a prompt asking for proxy info
     17                           #--> True: -nonet or -noproxy or -binary=
    1518showWXerror = False        # if True, errors are shown in wxPython windows (used on Windows only)
     19                           #--> True: -noinstall or -binary= (both on windows)
    1620help = False               # if True, a help message is shown
     21                           #--> True: -help
    1722allBinaries = False        # if True, causes all binaries to be installed
    18 binaryVersion=None         # if specified, gives a specific numpy version to use (such as 1.18)
     23                           #--> True: -allbinaries or -server
     24numpyVersion=None          # if specified, gives a specific numpy version to use (such as 1.18)
    1925                           # for selecting a set of binaries to use
    20 numpyVersion=None
     26                           #--> Set by: -binary=
    2127
    2228for a in sys.argv[1:]:
     
    581587elif numpyVersion:
    582588    binaryVersion = GSASIIpath.GetBinaryPrefix()+'_n'+numpyVersion
     589    print('Load binaries from '+binaryVersion)
    583590    if not GSASIIpath.svnSwitchDir('bindist','',g2home+ 'Binaries/'+binaryVersion,None,True):
    584591        msg = 'Binary load failed with '+binaryVersion+'. Subversion problem? Please seek help'
    585592        BailOut(msg)
    586593else:
     594    print('Load binaries matching current python/numpy')
    587595    GSASIIpath.DownloadG2Binaries(g2home)
    588596       
     
    649657            exec(source_file.read())
    650658
     659#===========================================================================
     660# on Windows, make a batch file with Python and GSAS-II location hard-coded
    651661if skipInstallChecks:
    652662    pass
    653 #===========================================================================
    654 # on Windows, make a batch file with Python and GSAS-II location hard-coded
    655663elif sys.platform.startswith('win') and os.path.exists(
    656664    os.path.join(path2GSAS2,"makeBat.py")):
     
    659667# on a Mac, make an applescript
    660668elif sys.platform.startswith('darwin') and os.path.exists(
    661     os.path.join(path2GSAS2,"makeMacApp.py")):
     669         os.path.join(path2GSAS2,"makeMacApp.py")):
    662670    sys.argv = [os.path.join(path2GSAS2,"makeMacApp.py")]
    663671    print(u'running '+sys.argv[0])
     
    666674# On linux, make desktop icon
    667675elif sys.platform.startswith('linux') and os.path.exists(
    668     os.path.join(path2GSAS2,"makeLinux.py")):
     676         os.path.join(path2GSAS2,"makeLinux.py")):
    669677    sys.argv = [os.path.join(path2GSAS2,"makeLinux.py")]
    670678    print(u'running '+sys.argv[0])
Note: See TracChangeset for help on using the changeset viewer.