Changeset 2855


Ignore:
Timestamp:
Jun 3, 2017 5:43:20 PM (7 years ago)
Author:
toby
Message:

rework bootstrap.py for more diagnostics; require wxpython 3.x for future g2conda builds

Location:
install
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • install/bootstrap.py

    r2535 r2855  
    154154cmd = [svn, 'co', home+ 'trunk/', gsaspath, '--non-interactive', '--trust-server-cert']
    155155if proxycmds: cmd += proxycmds
    156 msg = 'loading GSAS-II'
    157    
    158 print 70*'*'
    159 print msg + ' from ' + cmd[2]
     156msg = 'Now preparing to install GSAS-II'
     157print('\n'+75*'*')
     158print(msg + u' from ' + cmd[2])
     159print('  *** If GSAS-II fails to be installed, you likely have a network access')
     160print('  *** problem, most commonly because you need to use a network proxy. Please')
     161print('  *** check with a network administrator or use http://www.whatismyproxy.com/\n')
    160162print 'svn load command:'
    161163for item in cmd: print item,
     
    171173
    172174#===========================================================================
     175# test if the compiled files load correctly
     176#===========================================================================
     177script = """
     178try:
     179    import GSASIIpath
     180    import pyspg
     181    import histogram2d
     182    import polymask
     183    import pypowder
     184    import pytexture
     185    pyspg.sgforpy('P -1')
     186    print('==OK==')
     187except:
     188    pass
     189"""
     190p = subprocess.Popen([sys.executable,'-c',script],stdout=subprocess.PIPE,cwd=gsaspath)
     191res,err = p.communicate()
     192if '==OK==' not in res or p.returncode != 0:
     193    print('\n'+75*'=')
     194    print('Failed when testing the GSAS-II compiled files. GSAS-II will not run without')
     195    print('correcting this. Attempting to open a web page on compiling GSAS-II...')
     196    print('(https://subversion.xray.aps.anl.gov/trac/pyGSAS/wiki/CompileGSASII)')
     197    print(75*'=')
     198    print('\n')
     199    import webbrowser
     200    webbrowser.open_new('https://subversion.xray.aps.anl.gov/trac/pyGSAS/wiki/CompileGSASII')
     201    sys.exit()
     202else:
     203    print 'Successfully tested compiled routines'
     204#===========================================================================
    173205# import all .py files so that .pyc files get created
    174206print 'Byte-compiling all .py files...',
     
    179211# platform-dependent stuff
    180212#===========================================================================
    181 # on Windows,
     213# on Windows, make a batch file with Python and GSAS-II location hard-coded
    182214if sys.platform.startswith('win') and os.path.exists(
    183215    os.path.join(gsaspath,"makeBat.py")):
  • install/g2conda/construct.yaml

    r2507 r2855  
    1919  - pillow
    2020  - pyopengl
    21   - wxpython
     21  - wxpython 3.*
    2222  - svn
    2323  - hdf5
  • install/g2pkg/meta.yaml

    r2410 r2855  
    11package:
    22  name: g2load
    3   version: 0.1.8  # remember to change in construct.yaml to match
     3  version: 0.1.8  # remember to change in g2conda/construct.yaml to match this
    44
    55source:
Note: See TracChangeset for help on using the changeset viewer.