- Timestamp:
- Aug 7, 2016 5:12:26 PM (7 years ago)
- Location:
- install
- Files:
-
- 2 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
install/bootstrap.py
r2315 r2410 6 6 home = 'https://subversion.xray.aps.anl.gov/pyGSAS/' 7 7 print 70*'*' 8 #testing for incorrect locale code' 9 try: 10 import locale 11 locale.getdefaultlocale() 12 except ValueError: 13 print 'Your location is not set properly. This causes problems for matplotlib' 14 print ' (see https://github.com/matplotlib/matplotlib/issues/5420.)' 15 print 'Will try to bypass problem by setting LC_ALL to en_US.UTF-8 (US English)' 16 os.environ['LC_ALL'] = 'en_US.UTF-8' 17 locale.getdefaultlocale() 18 print 'Preloading matplotlib to build fonts...' 19 try: 20 import matplotlib 21 except: 22 pass 8 23 print 'Checking python packages...', 9 24 missing = [] 10 for pkg in ['numpy','scipy','matplotlib','wx' ]:25 for pkg in ['numpy','scipy','matplotlib','wx',]: 11 26 try: 12 27 exec('import '+pkg) 13 except ImportError:28 except: 14 29 missing.append(pkg) 15 # handle pyopenGl differently, because that we can install later16 try:17 import OpenGL as ogl18 install_with_easyinstall = None19 except ImportError:20 print '\nPyOpenGL not present. ',21 try:22 from setuptools.command import easy_install23 except ImportError:24 missing.append('setuptools')25 def install_with_easyinstall(package):26 try:27 print "trying system-wide ",28 easy_install.main(['-f',os.path.split(__file__)[0],package])29 return30 except:31 pass32 try:33 print "trying user level ",34 easy_install.main(['-f',os.path.split(__file__)[0],'--user',package])35 return36 except:37 print "\nInstall of "+package+" failed. Please report this information:"38 import traceback39 print traceback.format_exc()40 sys.exit()41 30 42 31 if missing: … … 46 35 for pkg in missing: print " ",pkg, 47 36 print 48 print "We suggest installing the free Canopy Express package at http://www.enthought.com/downloads" 49 print "or the free Anaconda python package at https://store.continuum.io/cshop/anaconda/" 37 print "This should not happen as this script should be called with a " 38 print "specially configured version of the free Anaconda python package." 39 print "Please contact Brian Toby (toby@anl.gov)" 40 for pkg in ['numpy','scipy','matplotlib','wx',]: 41 exec('import '+pkg) 50 42 sys.exit() 43 try: 44 import OpenGL 45 except: 46 print "Missing the OpenGL Python package." 47 print "This should not happen as this script should be called with a " 48 print "specially configured version of the free Anaconda python package," 49 print "but GSAS-II can install this package anyway." 50 print "Please contact Brian Toby (toby@anl.gov) to report this problem." 51 51 52 52 # path to where this script is located … … 64 64 # add the standard location for wandisco svn to the path 65 65 pathlist.append('/opt/subversion/bin') 66 if sys.platform.startswith('win'): 67 svn = 'svn.exe' 68 else: 69 svn = 'svn' 70 # use svn installed via conda 1st (mac) 71 if os.path.exists(os.path.join(os.path.split(sys.executable)[0],svn)): 72 pathlist.insert(0,os.path.split(sys.executable)[0]) 73 # use svn installed via conda 1st (Windows) 74 if os.path.exists(os.path.join(os.path.split(sys.executable)[0],'Library','bin',svn)): 75 pathlist.insert(0,os.path.join(os.path.split(sys.executable)[0],'Library','bin')) 76 66 77 for path in pathlist: 67 78 svn = os.path.join(path,'svn') … … 75 86 else: 76 87 raise Exception('Subversion (svn) not found') 77 print ' found svn i n',svn88 print ' found svn image: '+svn 78 89 79 90 print 'Ready to bootstrap GSAS-II from repository\n\t',home,'\nto '+gsaspath … … 135 146 136 147 #=========================================================================== 137 # install OpenGL, if needed.138 if install_with_easyinstall:139 print '\nInstalling PyOpenGL. Lots of warnings will follow... ',140 install_with_easyinstall('PyOpenGl')141 print 'done.'142 #===========================================================================143 148 # import all .py files so that .pyc files get created 144 149 print 'Byte-compiling all .py files...', … … 157 162 elif sys.platform.startswith('darwin') and os.path.exists( 158 163 os.path.join(gsaspath,"makeMacApp.py")): 164 print('running '+os.path.join(gsaspath,"makeMacApp.py")) 159 165 execfile(os.path.join(gsaspath,"makeMacApp.py")) 160 166 #=========================================================================== -
install/g2conda/construct.yaml
r2370 r2410 9 9 10 10 packages: 11 - g2load-0.1. 7-011 - g2load-0.1.8-0 12 12 13 13 specs: … … 29 29 - pyqt 30 30 31 post_install: g2install.bat [win] 31 #post_install: g2install.sh [unix] 32 #post_install: g2install.bat [win] 32 33 33 34 license_file: EULA.txt -
install/g2pkg/meta.yaml
r2315 r2410 1 1 package: 2 2 name: g2load 3 version: 0.1. 73 version: 0.1.8 # remember to change in construct.yaml to match 4 4 5 #source:6 #path: ./src5 source: 6 path: ./src 7 7 8 8 about: -
install/g2pkg/post-link.bat
r2371 r2410 1 1 echo "Install GSAS-II from APS subversion server (v. 2016/7/12)" 2 rem echo a error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"3 2 mkdir "%PREFIX%\GSASII" 4 rem echo b error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"5 3 copy "%PREFIX%\Scripts\gsas2-install.py" "%PREFIX%\GSASII\bootstrap.py" 6 rem echo c error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"7 4 set "python=%PREFIX%\python.exe" 8 5 set "script=%PREFIX%\GSASII\bootstrap.py" 9 rem echo d error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"10 6 "%python%" "%script%" 11 rem echo e error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"12 7 pause 13 rem echo f error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"14 8 set errorlevel=0 15 rem echo g error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"16 9 exit 0 17 rem echo h error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt" -
install/g2pkg/src/bootstrap.py
r2345 r2410 6 6 home = 'https://subversion.xray.aps.anl.gov/pyGSAS/' 7 7 print 70*'*' 8 print 'Preload matplotlib to build fonts...' 8 #testing for incorrect locale code' 9 try: 10 import locale 11 locale.getdefaultlocale() 12 except ValueError: 13 print 'Your location is not set properly. This causes problems for matplotlib' 14 print ' (see https://github.com/matplotlib/matplotlib/issues/5420.)' 15 print 'Will try to bypass problem by setting LC_ALL to en_US.UTF-8 (US English)' 16 os.environ['LC_ALL'] = 'en_US.UTF-8' 17 locale.getdefaultlocale() 18 print 'Preloading matplotlib to build fonts...' 9 19 try: 10 20 import matplotlib … … 13 23 print 'Checking python packages...', 14 24 missing = [] 15 for pkg in ['numpy','scipy','matplotlib','wx', 'OpenGL']:25 for pkg in ['numpy','scipy','matplotlib','wx',]: 16 26 try: 17 27 exec('import '+pkg) … … 28 38 print "specially configured version of the free Anaconda python package." 29 39 print "Please contact Brian Toby (toby@anl.gov)" 40 for pkg in ['numpy','scipy','matplotlib','wx',]: 41 exec('import '+pkg) 30 42 sys.exit() 43 try: 44 import OpenGL 45 except: 46 print "Missing the OpenGL Python package." 47 print "This should not happen as this script should be called with a " 48 print "specially configured version of the free Anaconda python package," 49 print "but GSAS-II can install this package anyway." 50 print "Please contact Brian Toby (toby@anl.gov) to report this problem." 31 51 32 52 # path to where this script is located
Note: See TracChangeset
for help on using the changeset viewer.