Changeset 3677


Ignore:
Timestamp:
Oct 17, 2018 12:45:38 PM (5 years ago)
Author:
toby
Message:

add activate to windows bat file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/makeBat.py

    r3209 r3677  
    3939@echo ========================================================================
    4040@
    41 {:s} {:s} "%~1"
     41{:s}{:s} {:s} "%~1"
    4242@REM To keep the window from disappearing with any error messages
    4343pause
     
    6262    fp.write("@REM created by run of bootstrap.py on {:%d %b %Y %H:%M}\n".format(
    6363        datetime.datetime.now()))
     64    activate = "call "+os.path.join(os.path.split(pythonexe)[0],'Scripts','activate')+'\n'
     65    if os.path.exists(activate):
     66        print('adding activate to .bat file')
     67    else:
     68        print('activate not found')
     69        activate = ''
    6470    pexe = pythonexe
    6571    if ' ' in pythonexe: pexe = '"'+pythonexe+'"'
     
    7177    #if os.path.exists(mdir):
    7278    #    fp.write('@path={};%path%\n'.format(mdir))
    73     fp.write(Script.format(pexe,G2s))
     79    fp.write(Script.format(activate,pexe,G2s))
    7480    fp.close()
    7581    print('\nCreated GSAS-II batch file RunGSASII.bat in '+gsaspath)
Note: See TracChangeset for help on using the changeset viewer.