Changeset 4736
- Timestamp:
- Jan 7, 2021 3:53:49 PM (3 years ago)
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
install/bootstrap.py
r4732 r4736 11 11 skipInstallChecks = False # if set to True, continue installation even if current Python lacks packages and 12 12 # skips platform-dependent installation steps 13 #--> True: -noinstall or -binary= 13 14 skipDownloadSteps = False # if False, svn is used to download GSAS-II files and binaries 15 #--> True: -nonet 14 16 skipProxy = False # if False then the script creates a prompt asking for proxy info 17 #--> True: -nonet or -noproxy or -binary= 15 18 showWXerror = False # if True, errors are shown in wxPython windows (used on Windows only) 19 #--> True: -noinstall or -binary= (both on windows) 16 20 help = False # if True, a help message is shown 21 #--> True: -help 17 22 allBinaries = 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 24 numpyVersion=None # if specified, gives a specific numpy version to use (such as 1.18) 19 25 # for selecting a set of binaries to use 20 numpyVersion=None 26 #--> Set by: -binary= 21 27 22 28 for a in sys.argv[1:]: … … 581 587 elif numpyVersion: 582 588 binaryVersion = GSASIIpath.GetBinaryPrefix()+'_n'+numpyVersion 589 print('Load binaries from '+binaryVersion) 583 590 if not GSASIIpath.svnSwitchDir('bindist','',g2home+ 'Binaries/'+binaryVersion,None,True): 584 591 msg = 'Binary load failed with '+binaryVersion+'. Subversion problem? Please seek help' 585 592 BailOut(msg) 586 593 else: 594 print('Load binaries matching current python/numpy') 587 595 GSASIIpath.DownloadG2Binaries(g2home) 588 596 … … 649 657 exec(source_file.read()) 650 658 659 #=========================================================================== 660 # on Windows, make a batch file with Python and GSAS-II location hard-coded 651 661 if skipInstallChecks: 652 662 pass 653 #===========================================================================654 # on Windows, make a batch file with Python and GSAS-II location hard-coded655 663 elif sys.platform.startswith('win') and os.path.exists( 656 664 os.path.join(path2GSAS2,"makeBat.py")): … … 659 667 # on a Mac, make an applescript 660 668 elif sys.platform.startswith('darwin') and os.path.exists( 661 os.path.join(path2GSAS2,"makeMacApp.py")):669 os.path.join(path2GSAS2,"makeMacApp.py")): 662 670 sys.argv = [os.path.join(path2GSAS2,"makeMacApp.py")] 663 671 print(u'running '+sys.argv[0]) … … 666 674 # On linux, make desktop icon 667 675 elif sys.platform.startswith('linux') and os.path.exists( 668 os.path.join(path2GSAS2,"makeLinux.py")):676 os.path.join(path2GSAS2,"makeLinux.py")): 669 677 sys.argv = [os.path.join(path2GSAS2,"makeLinux.py")] 670 678 print(u'running '+sys.argv[0]) -
install/g2complete/build.sh.template
r4710 r4736 8 8 mkdir -p $PREFIX/GSASII 9 9 cp $RECIPE_DIR/src/bootstrap.py $PREFIX/GSASII 10 python $PREFIX/GSASII/bootstrap.py --binary=**npversion** > $PREFIX/ conda_G2build_log.txt10 python $PREFIX/GSASII/bootstrap.py --binary=**npversion** > $PREFIX/GSASII/conda_G2build_log.txt 2>&1 -
install/g2complete/post-link.sh
r4715 r4736 1 1 #!/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 2 echo "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) 7 4 # 8 5 # "install" the GSAS-II package (create shortcuts, byte-compile...) 9 6 # 10 $PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --nonet > /tmp/bootstrap1.log 2>> $PREFIX/GSASII/conda_inst.log 2>&17 $PREFIX/bin/python $PREFIX/GSASII/bootstrap.py --nonet >> $PREFIX/GSASII/conda_inst.log 2>&1 11 8 # 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 10 cp $PREFIX/GSASII/conda_inst.log $PREFIX/.messages.txt 11 echo "GSAS-II bootstrap completed" >> $PREFIX/.messages.txt -
install/g2complete/src/bootstrap.py
r4732 r4736 11 11 skipInstallChecks = False # if set to True, continue installation even if current Python lacks packages and 12 12 # skips platform-dependent installation steps 13 #--> True: -noinstall or -binary= 13 14 skipDownloadSteps = False # if False, svn is used to download GSAS-II files and binaries 15 #--> True: -nonet 14 16 skipProxy = False # if False then the script creates a prompt asking for proxy info 17 #--> True: -nonet or -noproxy or -binary= 15 18 showWXerror = False # if True, errors are shown in wxPython windows (used on Windows only) 19 #--> True: -noinstall or -binary= (both on windows) 16 20 help = False # if True, a help message is shown 21 #--> True: -help 17 22 allBinaries = 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 24 numpyVersion=None # if specified, gives a specific numpy version to use (such as 1.18) 19 25 # for selecting a set of binaries to use 20 numpyVersion=None 26 #--> Set by: -binary= 21 27 22 28 for a in sys.argv[1:]: … … 581 587 elif numpyVersion: 582 588 binaryVersion = GSASIIpath.GetBinaryPrefix()+'_n'+numpyVersion 589 print('Load binaries from '+binaryVersion) 583 590 if not GSASIIpath.svnSwitchDir('bindist','',g2home+ 'Binaries/'+binaryVersion,None,True): 584 591 msg = 'Binary load failed with '+binaryVersion+'. Subversion problem? Please seek help' 585 592 BailOut(msg) 586 593 else: 594 print('Load binaries matching current python/numpy') 587 595 GSASIIpath.DownloadG2Binaries(g2home) 588 596 … … 649 657 exec(source_file.read()) 650 658 659 #=========================================================================== 660 # on Windows, make a batch file with Python and GSAS-II location hard-coded 651 661 if skipInstallChecks: 652 662 pass 653 #===========================================================================654 # on Windows, make a batch file with Python and GSAS-II location hard-coded655 663 elif sys.platform.startswith('win') and os.path.exists( 656 664 os.path.join(path2GSAS2,"makeBat.py")): … … 659 667 # on a Mac, make an applescript 660 668 elif sys.platform.startswith('darwin') and os.path.exists( 661 os.path.join(path2GSAS2,"makeMacApp.py")):669 os.path.join(path2GSAS2,"makeMacApp.py")): 662 670 sys.argv = [os.path.join(path2GSAS2,"makeMacApp.py")] 663 671 print(u'running '+sys.argv[0]) … … 666 674 # On linux, make desktop icon 667 675 elif sys.platform.startswith('linux') and os.path.exists( 668 os.path.join(path2GSAS2,"makeLinux.py")):676 os.path.join(path2GSAS2,"makeLinux.py")): 669 677 sys.argv = [os.path.join(path2GSAS2,"makeLinux.py")] 670 678 print(u'running '+sys.argv[0]) -
install/g2full/g2postinstall.sh
r4732 r4736 21 21 fi 22 22 # in case constructor changed the binary files 23 svn revert $PREFIX/GSASII/bindist/* 23 $PREFIX/bin/svn revert $PREFIX/GSASII/bindist/* 24 #create the GSAS-II app or Desktop icon (note that scripts run only on correct platform) 25 $PREFIX/bin/python $PREFIX/GSASII/makeMacApp.py 26 $PREFIX/bin/python $PREFIX/GSASII/makeLinux.py -
trunk/makeLinux.py
r3545 r4736 30 30 print("\n\tUsage: python "+sys.argv[0]+" [<GSAS-II script>]\n") 31 31 sys.exit() 32 if __name__ == '__main__': 32 33 if __name__ == '__main__' and sys.platform.startswith('linux'): 33 34 # find the main GSAS-II script if not on command line 34 35 if len(sys.argv) == 1: -
trunk/makeMacApp.py
r4725 r4736 7 7 created in the directory where the GSAS-II script (.../GSASII/GSASII.py) 8 8 is located. A softlink to Python is created inside that app bundle, 9 but the softlink name is GSAS-II so that GSAS-IIshows up as the name10 of the app rather than Python in the menu bar, etc. A soft link named9 but the softlink name is GSAS-II so that "GSAS-II" shows up as the name 10 of the app in the menu bar, etc. rather than "Python". A soft link named 11 11 GSAS-II.py, referencing the GSASII.py script, is created so that some file 12 12 menu items also are labeled with GSAS-II (but not the right capitalization, … … 15 15 This has been tested with several versions of Python interpreters 16 16 from Anaconda and does not require pythonw (Python.app). It tests to 17 make sure that a wx python script will run inside Python andif not,17 make sure that a wxpython script will run inside the app but if not, 18 18 it searches for a pythonw image and tries that. 19 19 … … 51 51 ''' 52 52 53 if __name__ == '__main__' :53 if __name__ == '__main__' and sys.platform == "darwin": 54 54 project="GSAS-II" 55 55
Note: See TracChangeset
for help on using the changeset viewer.