mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user