Changeset 4446 for install


Ignore:
Timestamp:
May 26, 2020 8:45:49 PM (16 months ago)
Author:
toby
Message:

final fixes of bootstrap

File:
1 edited

Legend:

Unmodified
Added
Removed
  • install/g2complete/src/bootstrap.py

    r4445 r4446  
    1818binaryVersion=None         # if specified, gives a specific numpy version to use (such as 1.18)
    1919                           # for selecting a set of binaries to use
     20numpyVersion=None
    2021
    2122for a in sys.argv[1:]:
     
    8586        dlg.Destroy()
    8687    else:
    87         print("BOOTSTRAP WARNING: ",file=sys.stderr)
    88         for line in msg.split('\n'):
    89             print(line,file=sys.stderr)
    90         print("Recreate this using command:")
     88        print("Recreate error this using command:")
    9189        print("     {} {} {}".format(
    9290            os.path.abspath(sys.executable),
     
    9492            ' '.join(sys.argv[1:]),
    9593        ),file=sys.stderr)
     94        print("\nBOOTSTRAP WARNING: ",file=sys.stderr)
     95        for line in msg.split('\n'):
     96            print(line,file=sys.stderr)
    9697    sys.exit()
    9798       
     
    470471            msg += err
    471472            if os.path.exists(os.path.join(path2GSAS2,"makeBat.py")):
    472                 msg += '\n\nGSAS-II failed to be updated. A likely reason is a network access'
    473                 msg += '\nproblem. If your web browser works, but the update did not.'
    474                 msg += '\nThe most common reason is you need to use a network proxy. Please'
     473                msg += '\nGSAS-II appears to be installed but failed to be updated. A likely reason'
     474                msg += '\nis a network access problem. If your web browser works, but this update did'
     475                msg += '\nnot, the most common reason is you need to use a network proxy. Please'
    475476                msg += '\ncheck with a network administrator or use http://www.whatismyproxy.com/'
     477                msg += '\n\nIf installing from the gsas2full dist and your computer is not connected'
     478                msg += '\nto the internet, this error message can be ignored.\n'
    476479            else:
    477480                # this will happen only with initial installs where all files
     
    510513# test if the compiled files load correctly
    511514#===========================================================================
     515GSASIItested = False
    512516if not skipInstallChecks:
    513     script = """  # commands that test each module can at least be loaded & run something in pyspg
    514     try:
    515         import GSASIIpath
    516         GSASIIpath.SetBinaryPath(loadBinary=False)
    517         import pyspg
    518         import histogram2d
    519         import polymask
    520         import pypowder
    521         import pytexture
    522         pyspg.sgforpy('P -1')
    523         print('==OK==')
    524     except Exception as err:
    525         print(err)
    526     """
     517    script = """ 
     518# commands that test each module can at least be loaded & run something in pyspg
     519try:
     520    import GSASIIpath
     521    GSASIIpath.SetBinaryPath(loadBinary=False)
     522    import pyspg
     523    import histogram2d
     524    import polymask
     525    import pypowder
     526    import pytexture
     527    pyspg.sgforpy('P -1')
     528    print('==OK==')
     529except Exception as err:
     530    print(err)
     531"""
    527532    p = subprocess.Popen([sys.executable,'-c',script],stdout=subprocess.PIPE,stderr=subprocess.PIPE,
    528533                         cwd=path2GSAS2)
     
    551556    else:
    552557        print('Successfully tested compiled routines')
     558        GSASIItested = True
    553559#===========================================================================
    554560# import all .py files so that .pyc files get created
Note: See TracChangeset for help on using the changeset viewer.