ImagingTools Core SDK
CPythonEnvironmentComp.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// ACF includes
6#include <icomp/CComponentBase.h>
7#include <ifile/IFileNameParam.h>
8
9
10namespace pybind11
11{
12 class scoped_interpreter;
13}
14
15
16namespace imtpy
17{
18
19
20class CPythonEnvironmentComp: public icomp::CComponentBase
21{
22public:
23 typedef icomp::CComponentBase BaseClass;
24
25 I_BEGIN_COMPONENT(CPythonEnvironmentComp);
26 I_ASSIGN(m_pythonInstallDirectoryCompPtr, "PythonInstallDirectory", "Directory where the python interpreter was installed", true, "PythonInstallDirectory");
27 I_END_COMPONENT;
28
29protected:
30 // reimplemented (icomp::CComponentBase)
31 virtual void OnComponentCreated() override;
32
33private:
34 static istd::TDelPtr<pybind11::scoped_interpreter> s_pythonInterpreter;
35
36 I_REF(ifile::IFileNameParam, m_pythonInstallDirectoryCompPtr);
37};
38
39
40} // namespace imtpy
41
42