scripts/install.py

changeset 7448
29b54296cf8c
parent 7360
9190402e4505
child 7453
54431a52b7f2
equal deleted inserted replaced
7447:ba6171edd33d 7448:29b54296cf8c
1305 ok = (exitCode == 0) 1305 ok = (exitCode == 0)
1306 1306
1307 return ok 1307 return ok
1308 1308
1309 1309
1310 def updatePip():
1311 """
1312 Update the installed pip package.
1313 """
1314 global yes2All
1315
1316 if yes2All:
1317 answer = "y"
1318 else:
1319 print("Shall 'pip' be updated (recommended)? (Y/n)", end=" ")
1320 answer = input()
1321 if answer in ("", "Y", "y"):
1322 subprocess.call(
1323 [sys.executable, "-m", "pip", "install", "--upgrade", "pip"])
1324
1325
1310 def doDependancyChecks(): 1326 def doDependancyChecks():
1311 """ 1327 """
1312 Perform some dependency checks. 1328 Perform some dependency checks.
1313 """ 1329 """
1314 print('Checking dependencies') 1330 print('Checking dependencies')
1331
1332 # update pip first even if we don't need to install anything
1333 updatePip()
1334 print("\n\n")
1315 1335
1316 # perform dependency checks 1336 # perform dependency checks
1317 print("Python Version: {0:d}.{1:d}.{2:d}".format(*sys.version_info[:3])) 1337 print("Python Version: {0:d}.{1:d}.{2:d}".format(*sys.version_info[:3]))
1318 if sys.version_info < (3, 5, 0): 1338 if sys.version_info < (3, 5, 0):
1319 print('Sorry, you must have Python 3.5.0 or higher.') 1339 print('Sorry, you must have Python 3.5.0 or higher.')

eric ide

mercurial