-
Notifications
You must be signed in to change notification settings - Fork 60
Open
Description
The pybind11 code to generate module is:
class A
{
public:
A()
{
}
/**
* @brief explanation from c++
*/
int Add(int a, int b)
{
return a+b;
}
};
PYBIND11_MODULE(module, m) {
m.doc() = "My Library Python Bindings";
py::class_<A>(m, "A")
.def(py::init<>())
.def("Add", &A::Add, "explanation from pybind");
}
And it successfully generated a python module, and I can import it:
Then, I want to generate the stub file for this module. I have tested the pybind11-stubgen
, and it works:
However, it failed when generate stub file for my-self package:
How should I use the pybind11-stubgen
?
Metadata
Metadata
Assignees
Labels
No labels