Mon, 06 Jun 2022 17:44:51 +0200
Fixed an issue detecting the eric api and eric documentation tools when installed via the wheel.
eric7/Plugins/PluginEricapi.py | file | annotate | diff | comparison | revisions | |
eric7/Plugins/PluginEricdoc.py | file | annotate | diff | comparison | revisions |
--- a/eric7/Plugins/PluginEricapi.py Mon Jun 06 16:32:04 2022 +0200 +++ b/eric7/Plugins/PluginEricapi.py Mon Jun 06 17:44:51 2022 +0200 @@ -8,6 +8,7 @@ """ import os +import sys from PyQt6.QtCore import QObject, QCoreApplication from PyQt6.QtWidgets import QDialog @@ -50,11 +51,28 @@ """ exe = 'eric7_api' if Utilities.isWindowsPlatform(): - exe = os.path.join(getConfig("bindir"), exe + '.cmd') - if not os.path.exists(exe): - exe = os.path.join(getConfig("bindir"), exe + '.bat') + for exepath in ( + getConfig("bindir"), + os.path.join(sys.exec_prefix, "Scripts"), + ): + found = False + for ext in (".exe", ".cmd", ".bat"): + exe_ = os.path.join(exepath, exe + ext) + if os.path.exists(exe_): + exe = exe_ + found = True + break + if found: + break else: - exe = os.path.join(getConfig("bindir"), exe) + for exepath in ( + getConfig("bindir"), + os.path.join(sys.exec_prefix, "bin"), + ): + exe_ = os.path.join(exepath, exe) + if os.path.exists(exe_): + exe = exe_ + break data = { "programEntry": True,
--- a/eric7/Plugins/PluginEricdoc.py Mon Jun 06 16:32:04 2022 +0200 +++ b/eric7/Plugins/PluginEricdoc.py Mon Jun 06 17:44:51 2022 +0200 @@ -8,6 +8,7 @@ """ import os +import sys from PyQt6.QtCore import QObject, QCoreApplication from PyQt6.QtWidgets import QDialog @@ -53,11 +54,29 @@ # 1. eric7_doc exe = 'eric7_doc' if Utilities.isWindowsPlatform(): - exe = os.path.join(getConfig("bindir"), exe + '.cmd') - if not os.path.exists(exe): - exe = os.path.join(getConfig("bindir"), exe + '.bat') + for exepath in ( + getConfig("bindir"), + os.path.join(sys.exec_prefix, "Scripts"), + ): + found = False + for ext in (".exe", ".cmd", ".bat"): + exe_ = os.path.join(exepath, exe + ext) + if os.path.exists(exe_): + exe = exe_ + found = True + break + if found: + break else: - exe = os.path.join(getConfig("bindir"), exe) + for exepath in ( + getConfig("bindir"), + os.path.join(sys.exec_prefix, "bin"), + ): + exe_ = os.path.join(exepath, exe) + if os.path.exists(exe_): + exe = exe_ + break + dataList.append({ "programEntry": True, "header": QCoreApplication.translate(