19 #include <pybind11/pybind11.h>
31 constexpr
Version(uint16_t major_, uint16_t minor_, uint16_t patch_)
159 void initVenv(
const QString &venvPrefix);
165 o <<
"PythonConfig { type: " << config.m_type <<
", home: '" << config.m_pythonHome
166 <<
"', path: '" << config.m_pythonPath <<
"'}";
171 QString m_pythonHome{};
172 QString m_pythonPath{};
203 std::unique_ptr<wchar_t[]> m_pythonHome{};
205 std::unique_ptr<wchar_t[]> m_pythonPath{};
constexpr Version PythonVersion(PY_MAJOR_VERSION, PY_MINOR_VERSION, PY_MICRO_VERSION)
Python Version the plugin was compiled against.
QStringView QtCompatStringRef
const wchar_t * pythonPath() const
Returns the pythonPath.
const wchar_t * pythonHome() const
Returns the pythonHome.
PythonConfigPaths()=default
Default ctor, does not initialize pythonHome & pythonPath.
bool isSet() const
returns true if both paths are non empty
Version getVersion() const
static PythonConfig fromContainingEnvironment()
bool validateAndDisplayErrors(QWidget *parent=nullptr) const
const QString & pythonHome() const
friend ostream & operator<<(ostream &o, Type type)
PythonConfigPaths pythonCompatiblePaths() const
friend ostream & operator<<(ostream &o, const PythonConfig &config)
void initFromLocation(const QString &prefix)
void preparePythonProcess(QProcess &pythonProcess) const
void initFromPythonExecutable(const QString &pythonExecutable)
static bool IsInsideEnvironment()
void initCondaEnv(const QString &condaPrefix)
Initialize the paths to use the conda environment stored at condaPrefix.
void initVenv(const QString &venvPrefix)
Initialize the paths to use the python venv stored at venvPrefix.
Simple representation of a SemVer version.
constexpr Version(uint16_t major_, uint16_t minor_, uint16_t patch_)
constexpr Version()=default
bool operator==(const Version &other) const
bool isCompatibleWithCompiledVersion() const