scripts/uninstall.py

branch
without_py2_and_pyqt4
changeset 7211
1c97f3142fa8
parent 7203
2079ccbfa335
child 7220
5cf645f6daab
equal deleted inserted replaced
7209:ad27005f08ac 7211:1c97f3142fa8
15 import sys 15 import sys
16 import os 16 import os
17 import shutil 17 import shutil
18 import glob 18 import glob
19 import distutils.sysconfig 19 import distutils.sysconfig
20
21 # get a local eric6config.py out of the way
22 if os.path.exists("eric6config.py"):
23 os.rename("eric6config.py", "eric6config.py.orig")
24 from eric6config import getConfig
25 20
26 # Define the globals. 21 # Define the globals.
27 progName = None 22 progName = None
28 currDir = os.getcwd() 23 currDir = os.getcwd()
29 pyModDir = None 24 pyModDir = None
55 pass 50 pass
56 51
57 os.chdir(currDir) 52 os.chdir(currDir)
58 53
59 sys.exit(rcode) 54 sys.exit(rcode)
55
56 # get a local eric6config.py out of the way
57 if os.path.exists("eric6config.py"):
58 os.rename("eric6config.py", "eric6config.py.orig")
59 try:
60 from eric6config import getConfig
61 except ImportError:
62 print("The eric6 IDE doesn't seem to be installed. Aborting.")
63 exit(1)
64 except SyntaxError:
65 # an incomplete or old config file was found
66 print("The eric6 IDE seems to be installed incompletely. Aborting.")
67 exit(1)
60 68
61 69
62 def usage(rcode=2): 70 def usage(rcode=2):
63 """ 71 """
64 Display a usage message and exit. 72 Display a usage message and exit.

eric ide

mercurial