Changeset 2410


Ignore:
Timestamp:
Aug 7, 2016 5:12:26 PM (5 years ago)
Author:
toby
Message:

update for new mac build

Location:
install
Files:
2 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • install/bootstrap.py

    r2315 r2410  
    66home = 'https://subversion.xray.aps.anl.gov/pyGSAS/'
    77print 70*'*'
     8#testing for incorrect locale code'
     9try:
     10    import locale
     11    locale.getdefaultlocale()
     12except 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()
     18print 'Preloading matplotlib to build fonts...'
     19try:
     20    import matplotlib
     21except:
     22    pass
    823print 'Checking python packages...',
    924missing = []
    10 for pkg in ['numpy','scipy','matplotlib','wx']:
     25for pkg in ['numpy','scipy','matplotlib','wx',]:
    1126    try:
    1227        exec('import '+pkg)
    13     except ImportError:
     28    except:
    1429        missing.append(pkg)
    15 # handle pyopenGl differently, because that we can install later
    16 try:
    17     import OpenGL as ogl
    18     install_with_easyinstall = None
    19 except ImportError:
    20     print '\nPyOpenGL not present. ',
    21     try:
    22         from setuptools.command import easy_install
    23     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             return
    30         except:
    31             pass
    32         try:
    33             print "trying user level ",
    34             easy_install.main(['-f',os.path.split(__file__)[0],'--user',package])
    35             return
    36         except:
    37             print "\nInstall of "+package+" failed. Please report this information:"
    38             import traceback
    39             print traceback.format_exc()
    40             sys.exit()
    4130
    4231if missing:
     
    4635    for pkg in missing: print " ",pkg,
    4736    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)
    5042    sys.exit()
     43try:
     44    import OpenGL
     45except:
     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."
    5151
    5252# path to where this script is located
     
    6464    # add the standard location for wandisco svn to the path
    6565    pathlist.append('/opt/subversion/bin')
     66if sys.platform.startswith('win'):
     67    svn = 'svn.exe'
     68else:
     69    svn = 'svn'
     70# use svn installed via conda 1st (mac)
     71if 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)
     74if 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
    6677for path in pathlist:
    6778    svn = os.path.join(path,'svn')
     
    7586else:
    7687    raise Exception('Subversion (svn) not found')
    77 print ' found svn in',svn
     88print ' found svn image: '+svn
    7889
    7990print 'Ready to bootstrap GSAS-II from repository\n\t',home,'\nto '+gsaspath
     
    135146
    136147#===========================================================================
    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 #===========================================================================
    143148# import all .py files so that .pyc files get created
    144149print 'Byte-compiling all .py files...',
     
    157162elif sys.platform.startswith('darwin') and os.path.exists(
    158163    os.path.join(gsaspath,"makeMacApp.py")):
     164    print('running '+os.path.join(gsaspath,"makeMacApp.py"))
    159165    execfile(os.path.join(gsaspath,"makeMacApp.py"))
    160166#===========================================================================
  • install/g2conda/construct.yaml

    r2370 r2410  
    99
    1010packages:
    11   - g2load-0.1.7-0
     11  - g2load-0.1.8-0
    1212
    1313specs:
     
    2929  - pyqt
    3030
    31 post_install: g2install.bat           [win]
     31#post_install: g2install.sh           [unix]
     32#post_install: g2install.bat           [win]
    3233
    3334license_file: EULA.txt
  • install/g2pkg/meta.yaml

    r2315 r2410  
    11package:
    22  name: g2load
    3   version: 0.1.7
     3  version: 0.1.8  # remember to change in construct.yaml to match
    44
    5 #source:
    6 #  path: ./src
     5source:
     6  path: ./src
    77
    88about:
  • install/g2pkg/post-link.bat

    r2371 r2410  
    11echo "Install GSAS-II from APS subversion server (v. 2016/7/12)"
    2 rem echo a error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"
    32mkdir "%PREFIX%\GSASII"
    4 rem echo b error level is %ERRORLEVEL%  >> "%PREFIX%\install-out.txt"
    53copy "%PREFIX%\Scripts\gsas2-install.py" "%PREFIX%\GSASII\bootstrap.py"
    6 rem echo c error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"
    74set "python=%PREFIX%\python.exe"
    85set "script=%PREFIX%\GSASII\bootstrap.py"
    9 rem echo d error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"
    106"%python%" "%script%"
    11 rem echo e error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"
    127pause
    13 rem echo f error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"
    148set errorlevel=0
    15 rem echo g error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"
    169exit 0
    17 rem echo h error level is %ERRORLEVEL% >> "%PREFIX%\install-out.txt"
  • install/g2pkg/src/bootstrap.py

    r2345 r2410  
    66home = 'https://subversion.xray.aps.anl.gov/pyGSAS/'
    77print 70*'*'
    8 print 'Preload matplotlib to build fonts...'
     8#testing for incorrect locale code'
     9try:
     10    import locale
     11    locale.getdefaultlocale()
     12except 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()
     18print 'Preloading matplotlib to build fonts...'
    919try:
    1020    import matplotlib
     
    1323print 'Checking python packages...',
    1424missing = []
    15 for pkg in ['numpy','scipy','matplotlib','wx','OpenGL']:
     25for pkg in ['numpy','scipy','matplotlib','wx',]:
    1626    try:
    1727        exec('import '+pkg)
     
    2838    print "specially configured version of the free Anaconda python package."
    2939    print "Please contact Brian Toby (toby@anl.gov)"
     40    for pkg in ['numpy','scipy','matplotlib','wx',]:
     41        exec('import '+pkg)
    3042    sys.exit()
     43try:
     44    import OpenGL
     45except:
     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."
    3151
    3252# path to where this script is located
Note: See TracChangeset for help on using the changeset viewer.