scripts/install.py

branch
eric7-maintenance
changeset 9832
3885b9d7bd31
parent 9725
b9a29a7aa820
parent 9819
51822ebcb6de
child 9940
a57c188857e9
equal deleted inserted replaced
9726:9e14817925e5 9832:3885b9d7bd31
511 "eric7_doc", 511 "eric7_doc",
512 "eric7_editor", 512 "eric7_editor",
513 "eric7_hexeditor", 513 "eric7_hexeditor",
514 "eric7_iconeditor", 514 "eric7_iconeditor",
515 "eric7_ide", 515 "eric7_ide",
516 "eric7_pdf",
516 "eric7_plugininstall", 517 "eric7_plugininstall",
517 "eric7_pluginrepository", 518 "eric7_pluginrepository",
518 "eric7_pluginuninstall", 519 "eric7_pluginuninstall",
519 "eric7_qregularexpression", 520 "eric7_qregularexpression",
520 "eric7_re", 521 "eric7_re",
749 "eric7_diff", 750 "eric7_diff",
750 "eric7_editor", 751 "eric7_editor",
751 "eric7_hexeditor", 752 "eric7_hexeditor",
752 "eric7_iconeditor", 753 "eric7_iconeditor",
753 "eric7_ide", 754 "eric7_ide",
755 "eric7_pdf",
754 "eric7_plugininstall", 756 "eric7_plugininstall",
755 "eric7_pluginrepository", 757 "eric7_pluginrepository",
756 "eric7_pluginuninstall", 758 "eric7_pluginuninstall",
757 "eric7_qregularexpression", 759 "eric7_qregularexpression",
758 "eric7_re", 760 "eric7_re",
917 # install the API file 919 # install the API file
918 if installApis: 920 if installApis:
919 if os.access(cfg["apidir"], os.W_OK): 921 if os.access(cfg["apidir"], os.W_OK):
920 for progLanguage in progLanguages: 922 for progLanguage in progLanguages:
921 apidir = os.path.join(cfg["apidir"], progLanguage) 923 apidir = os.path.join(cfg["apidir"], progLanguage)
922 print(
923 "\nInstalling {0} API files to '{1}'.".format(progLanguage, apidir)
924 )
925 if not os.path.exists(apidir): 924 if not os.path.exists(apidir):
926 os.makedirs(apidir) 925 os.makedirs(apidir)
927 for apiName in glob.glob( 926 for apiName in glob.glob(
928 os.path.join(eric7SourceDir, "APIs", progLanguage, "*.api") 927 os.path.join(eric7SourceDir, "APIs", progLanguage, "*.api")
929 ): 928 ):
1707 "cyclonedx-bom": ("cyclonedx_py", ""), 1706 "cyclonedx-bom": ("cyclonedx_py", ""),
1708 "trove-classifiers": ("trove_classifiers", ""), 1707 "trove-classifiers": ("trove_classifiers", ""),
1709 "black": ("black", ">=22.6.0"), 1708 "black": ("black", ">=22.6.0"),
1710 "isort": ("isort", ">=5.10.0"), 1709 "isort": ("isort", ">=5.10.0"),
1711 "coverage": ("coverage", ">=6.5.0"), 1710 "coverage": ("coverage", ">=6.5.0"),
1711 "semver": ("semver", ""),
1712 } 1712 }
1713 optionalModulesList = { 1713 optionalModulesList = {
1714 # key is pip project name 1714 # key is pip project name
1715 # value is tuple of package name, pip install constraint 1715 # value is tuple of package name, pip install constraint
1716 "docutils": ("docutils", ""), 1716 "docutils": ("docutils", ""),
2280 compileall.compile_dir( 2280 compileall.compile_dir(
2281 eric7SourceDir, 2281 eric7SourceDir,
2282 ddir=os.path.join(distDir, modDir, cfg["ericDir"]), 2282 ddir=os.path.join(distDir, modDir, cfg["ericDir"]),
2283 rx=skipRe, 2283 rx=skipRe,
2284 quiet=True, 2284 quiet=True,
2285 workers=0,
2285 ) 2286 )
2286 py_compile.compile( 2287 py_compile.compile(
2287 configName, dfile=os.path.join(distDir, modDir, "eric7config.py") 2288 configName, dfile=os.path.join(distDir, modDir, "eric7config.py")
2288 ) 2289 )
2289 else: 2290 else:
2290 compileall.compile_dir( 2291 compileall.compile_dir(
2291 eric7SourceDir, 2292 eric7SourceDir,
2292 ddir=os.path.join(modDir, cfg["ericDir"]), 2293 ddir=os.path.join(modDir, cfg["ericDir"]),
2293 rx=skipRe, 2294 rx=skipRe,
2294 quiet=True, 2295 quiet=True,
2296 workers=0,
2295 ) 2297 )
2296 py_compile.compile(configName, dfile=os.path.join(modDir, "eric7config.py")) 2298 py_compile.compile(configName, dfile=os.path.join(modDir, "eric7config.py"))
2297 sys.stdout = sys.__stdout__ 2299 sys.stdout = sys.__stdout__
2298 print(" Done") 2300 print(" Done")
2299 2301

eric ide

mercurial