scripts/install.py

branch
maintenance
changeset 7642
72721823d453
parent 7607
dd1054be15aa
parent 7639
422fd05e9c91
child 7737
5371a22cf2aa
--- a/scripts/install.py	Sun May 31 17:26:46 2020 +0200
+++ b/scripts/install.py	Sat Jul 04 11:45:34 2020 +0200
@@ -9,8 +9,6 @@
 Installation script for the eric6 IDE and all eric6 related tools.
 """
 
-from __future__ import print_function
-
 import sys
 import os
 import re
@@ -19,7 +17,7 @@
 import glob
 import shutil
 import fnmatch
-import subprocess
+import subprocess               # secok
 import time
 import io
 import json
@@ -93,7 +91,7 @@
     
     if sys.platform.startswith(("win", "cygwin")):
         try:
-            input("Press enter to continue...")
+            input("Press enter to continue...")             # secok
         except (EOFError, SyntaxError):
             pass
     
@@ -366,7 +364,7 @@
     
     wname = os.path.join(saveDir, wname)
     copyToFile(wname, wrapper)
-    os.chmod(wname, 0o755)
+    os.chmod(wname, 0o755)                  # secok
 
     return wname
 
@@ -1014,7 +1012,7 @@
                 os.path.join(os.path.dirname(__file__),
                              "create_windows_links.py"),
             ]
-            subprocess.call(args)
+            subprocess.call(args)               # secok
         else:
             print(
                 "\nThe Python package 'pywin32' is not installed. Desktop and"
@@ -1114,7 +1112,7 @@
                '''exec "{2}" "{3}/{4}.py" "$@"\n'''
                .format(pathLine, dyldLine, starter, pydir, "eric6"))
     copyToFile(wname, wrapper)
-    os.chmod(wname, 0o755)
+    os.chmod(wname, 0o755)                  # secok
     
     shutilCopy(os.path.join(eric6SourceDir, "pixmaps", "eric_2.icns"),
                os.path.join(directories["icns"], "eric.icns"))
@@ -1302,9 +1300,9 @@
     else:
         print("{0}\n\nShall '{1}' be installed using pip? (Y/n)"
               .format(message, packageName), end=" ")
-        answer = input()
+        answer = input()                            # secok
     if answer in ("", "Y", "y"):
-        exitCode = subprocess.call(
+        exitCode = subprocess.call(                 # secok
             [sys.executable, "-m", "pip", "install", packageName])
         ok = (exitCode == 0)
     
@@ -1319,7 +1317,7 @@
     @rtype bool
     """
     try:
-        pipOut = subprocess.check_output([
+        pipOut = subprocess.check_output([          # secok
             sys.executable, "-m", "pip", "list", "--outdated",
             "--format=json"
         ])
@@ -1350,9 +1348,9 @@
         answer = "y"
     else:
         print("Shall 'pip' be updated (recommended)? (Y/n)", end=" ")
-        answer = input()
+        answer = input()            # secok
     if answer in ("", "Y", "y"):
-        subprocess.call(
+        subprocess.call(            # secok
             [sys.executable, "-m", "pip", "install", "--upgrade", "pip"])
 
 
@@ -1372,9 +1370,6 @@
     if sys.version_info < (3, 5, 0):
         print('Sorry, you must have Python 3.5.0 or higher.')
         exit(5)
-    if sys.version_info[0] > 3:
-        print('Sorry, eric6 requires Python 3 for running.')
-        exit(5)
     
     try:
         import xml.etree            # __IGNORE_WARNING__
@@ -1652,7 +1647,7 @@
     except EnvironmentError:
         pass
     try:
-        hgOut = subprocess.check_output(["hg", "identify", "-i"])
+        hgOut = subprocess.check_output(["hg", "identify", "-i"])   # secok
         hgOut = hgOut.decode()
     except (OSError, subprocess.CalledProcessError):
         hgOut = ""
@@ -1838,6 +1833,7 @@
         elif opt == "-f":
             try:
                 exec(compile(open(arg).read(), arg, 'exec'), globals())
+                # secok
                 if len(cfg) != configLength:
                     print("The configuration dictionary in '{0}' is incorrect."
                           " Aborting".format(arg))

eric ide

mercurial