- Timestamp:
- Jul 30, 2017 7:37:08 PM (6 years ago)
- Location:
- install
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
install/bootstrap.py
r2887 r2952 231 231 print('\n'+75*'*') 232 232 print(msg + u' from ' + cmd[2]) 233 print(' *** If GSAS-II fails to be installed, you likely have a network access')234 print(' *** problem, most commonly because you need to use a network proxy. Please')235 print(' *** check with a network administrator or use http://www.whatismyproxy.com/\n')236 233 print 'svn load command:' 237 234 for item in cmd: print item, 238 235 print "" 239 p = subprocess.call(cmd) 240 if p: 241 print 'subversion returned an error; Retrying with command for older version...' 236 s = subprocess.Popen(cmd,stderr=subprocess.PIPE) 237 print('\nsubversion output:') 238 out,err = s.communicate() 239 if err: 240 print('subversion returned an error:') 241 print(err) 242 print('Retrying with command for older svn version...') 242 243 cmd = [svn, 'co', g2home+ 'trunk/', gsaspath] 243 244 if proxycmds: cmd += proxycmds 244 245 for item in cmd: print item, 245 246 print "" 246 p = subprocess.call(cmd) 247 s = subprocess.Popen(cmd,stderr=subprocess.PIPE) 248 out,err = s.communicate() 249 if err: 250 print('subversion returned an error:') 251 print(err) 252 print(' *** GSAS-II failed to be installed: you likely have a network access') 253 print(' *** problem, most commonly because you need to use a network proxy. Please') 254 print(' *** check with a network administrator or use http://www.whatismyproxy.com/\n') 255 sys.exit() 247 256 print('\n'+75*'*') 248 257 249 #===========================================================================250 # test if the compiled files load correctly251 #===========================================================================252 258 try: 253 259 import GSASIIpath … … 261 267 sys.exit() 262 268 269 for a in sys.argv[1:]: 270 if 'allbin' in a.lower() or 'server' in a.lower(): 271 print('Loading all binaries with command...') 272 if not GSASIIpath.svnSwitchDir('AllBinaries','',g2home+ 'Binaries/',None,True): 273 print('Binary load failed') 274 sys.exit() 275 break 276 else: 277 GSASIIpath.DownloadG2Binaries(g2home) 278 279 #=========================================================================== 280 # test if the compiled files load correctly 281 #=========================================================================== 282 263 283 script = """ # commands that test each module can at least be loaded & run something in pyspg 264 284 try: 265 285 import GSASIIpath 286 GSASIIpath.SetBinaryPath() 266 287 import pyspg 267 288 import histogram2d … … 274 295 pass 275 296 """ 276 p = subprocess.Popen([sys.executable,'-c',script],stdout=subprocess.PIPE,stderr=subprocess.PIPE) 297 p = subprocess.Popen([sys.executable,'-c',script],stdout=subprocess.PIPE,stderr=subprocess.PIPE, 298 cwd=gsaspath) 277 299 res,err = p.communicate() 278 300 if '==OK==' not in res or p.returncode != 0: … … 313 335 elif sys.platform.startswith('darwin') and os.path.exists( 314 336 os.path.join(gsaspath,"makeMacApp.py")): 315 print('running '+os.path.join(gsaspath,"makeMacApp.py")) 316 execfile(os.path.join(gsaspath,"makeMacApp.py")) 337 sys.argv = [os.path.join(gsaspath,"makeMacApp.py")] 338 print(u'running '+sys.argv[0]) 339 execfile(sys.argv[0]) 317 340 #=========================================================================== 318 341 # On linux, make desktop icon
Note: See TracChangeset
for help on using the changeset viewer.