mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
parent
8b330e3ac0
commit
baa13c044a
12 changed files with 16 additions and 1247 deletions
|
@ -240,10 +240,7 @@ bool Utils::ForeignApps::PythonInfo::isValid() const
|
|||
|
||||
bool Utils::ForeignApps::PythonInfo::isSupportedVersion() const
|
||||
{
|
||||
const int majorVer = version.majorNumber();
|
||||
return ((majorVer > 3)
|
||||
|| ((majorVer == 3) && (version >= Version {3, 3, 0}))
|
||||
|| ((majorVer == 2) && (version >= Version {2, 7, 9})));
|
||||
return (version >= Version {3, 3, 0});
|
||||
}
|
||||
|
||||
PythonInfo Utils::ForeignApps::pythonInfo()
|
||||
|
@ -251,14 +248,12 @@ PythonInfo Utils::ForeignApps::pythonInfo()
|
|||
static PythonInfo pyInfo;
|
||||
if (!pyInfo.isValid()) {
|
||||
#if defined(Q_OS_UNIX)
|
||||
// On Unix-Like Systems python2 and python3 should always exist
|
||||
// On Unix-Like systems python3 should always exist
|
||||
// https://www.python.org/dev/peps/pep-0394/
|
||||
if (testPythonInstallation("python3", pyInfo))
|
||||
return pyInfo;
|
||||
if (testPythonInstallation("python2", pyInfo))
|
||||
return pyInfo;
|
||||
#endif
|
||||
// Look for "python" in Windows and in UNIX if "python2" and "python3" are
|
||||
// Look for "python" in Windows and in UNIX if "python3" is
|
||||
// not detected.
|
||||
if (testPythonInstallation("python", pyInfo))
|
||||
return pyInfo;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue