394 for apiName in glob.glob(os.path.join("eric", "APIs", progLanguage, "*.api")): |
394 for apiName in glob.glob(os.path.join("eric", "APIs", progLanguage, "*.api")): |
395 try: |
395 try: |
396 shutil.copy(apiName, apidir) |
396 shutil.copy(apiName, apidir) |
397 except EnvironmentError: |
397 except EnvironmentError: |
398 print("Could not install '%s'." % apiName) |
398 print("Could not install '%s'." % apiName) |
|
399 if progLanguage == "Python": |
|
400 # copy Python3 API files to the same destination |
|
401 for apiName in glob.glob(os.path.join("eric", "APIs", "Python3", "*.api")): |
|
402 try: |
|
403 shutil.copy(apiName, apidir) |
|
404 except EnvironmentError: |
|
405 print("Could not install '%s'." % apiName) |
399 |
406 |
400 |
407 |
401 def createInstallConfig(): |
408 def createInstallConfig(): |
402 """ |
409 """ |
403 Create the installation config dictionary. |
410 Create the installation config dictionary. |
435 |
442 |
436 apis = [] |
443 apis = [] |
437 for progLanguage in progLanguages: |
444 for progLanguage in progLanguages: |
438 for apiName in glob.glob(os.path.join("eric", "APIs", progLanguage, "*.api")): |
445 for apiName in glob.glob(os.path.join("eric", "APIs", progLanguage, "*.api")): |
439 apis.append(os.path.basename(apiName)) |
446 apis.append(os.path.basename(apiName)) |
|
447 if progLanguage == "Python": |
|
448 # treat Python3 API files the same as Python API files |
|
449 for apiName in glob.glob(os.path.join("eric", "APIs", "Python3", "*.api")): |
|
450 apis.append(os.path.basename(apiName)) |
440 |
451 |
441 fn = 'eric5config.py' |
452 fn = 'eric5config.py' |
442 config = \ |
453 config = \ |
443 """# -*- coding: utf-8 -*- |
454 """# -*- coding: utf-8 -*- |
444 # |
455 # |