scripts/install.py

changeset 7178
43e994af5ee0
parent 7141
a479c75c6643
child 7185
af8e89a7a51d
equal deleted inserted replaced
7177:29e9027f28c0 7178:43e994af5ee0
964 except EnvironmentError: 964 except EnvironmentError:
965 print("Could not install '{0}' (no permission)." 965 print("Could not install '{0}' (no permission)."
966 .format(apiName)) 966 .format(apiName))
967 for apiName in glob.glob(os.path.join(eric6SourceDir, "APIs", 967 for apiName in glob.glob(os.path.join(eric6SourceDir, "APIs",
968 "Python3", "*.bas")): 968 "Python3", "*.bas")):
969 if os.path.exists(os.path.join(
970 apidir, os.path.basename(
971 apiName.replace(".bas", ".api")))):
972 try:
973 shutilCopy(apiName, apidir)
974 except EnvironmentError:
975 print("Could not install '{0}' (no permission)."
976 .format(apiName))
977
978 # copy MicroPython API files to the same destination
979 for apiName in glob.glob(os.path.join(eric6SourceDir, "APIs",
980 "MicroPython", "*.api")):
981 try:
982 shutilCopy(apiName, apidir)
983 except EnvironmentError:
984 print("Could not install '{0}' (no permission)."
985 .format(apiName))
986 for apiName in glob.glob(os.path.join(eric6SourceDir, "APIs",
987 "MicroPython", "*.bas")):
969 if os.path.exists(os.path.join( 988 if os.path.exists(os.path.join(
970 apidir, os.path.basename( 989 apidir, os.path.basename(
971 apiName.replace(".bas", ".api")))): 990 apiName.replace(".bas", ".api")))):
972 try: 991 try:
973 shutilCopy(apiName, apidir) 992 shutilCopy(apiName, apidir)
1333 # treat Python3 API files the same as Python API files 1352 # treat Python3 API files the same as Python API files
1334 for apiName in sorted( 1353 for apiName in sorted(
1335 glob.glob(os.path.join(eric6SourceDir, "APIs", "Python3", 1354 glob.glob(os.path.join(eric6SourceDir, "APIs", "Python3",
1336 "*.api"))): 1355 "*.api"))):
1337 apis.append(os.path.basename(apiName)) 1356 apis.append(os.path.basename(apiName))
1357
1358 # treat MicroPython API files the same as Python API files
1359 for apiName in sorted(
1360 glob.glob(os.path.join(eric6SourceDir, "APIs",
1361 "MicroPython", "*.api"))):
1362 apis.append(os.path.basename(apiName))
1338 1363
1339 config = ( 1364 config = (
1340 """# -*- coding: utf-8 -*-\n""" 1365 """# -*- coding: utf-8 -*-\n"""
1341 """#\n""" 1366 """#\n"""
1342 """# This module contains the configuration of the individual eric6""" 1367 """# This module contains the configuration of the individual eric6"""

eric ide

mercurial