mirror of
https://github.com/nomic-ai/kompute.git
synced 2026-05-12 01:19:58 +00:00
Updated setup.py to build base python setup
This commit is contained in:
@@ -1,36 +1,9 @@
|
||||
#include <pybind11/pybind11.h>
|
||||
|
||||
int add(int i, int j) {
|
||||
return i + j;
|
||||
}
|
||||
#include "kompute/Kompute.hpp"
|
||||
|
||||
namespace py = pybind11;
|
||||
|
||||
PYBIND11_MODULE(cmake_example, m) {
|
||||
m.doc() = R"pbdoc(
|
||||
Pybind11 example plugin
|
||||
-----------------------
|
||||
|
||||
.. currentmodule:: cmake_example
|
||||
|
||||
.. autosummary::
|
||||
:toctree: _generate
|
||||
|
||||
add
|
||||
subtract
|
||||
)pbdoc";
|
||||
|
||||
m.def("add", &add, R"pbdoc(
|
||||
Add two numbers
|
||||
|
||||
Some other explanation about the add function.
|
||||
)pbdoc");
|
||||
|
||||
m.def("subtract", [](int i, int j) { return i - j; }, R"pbdoc(
|
||||
Subtract two numbers
|
||||
|
||||
Some other explanation about the subtract function.
|
||||
)pbdoc");
|
||||
|
||||
#ifdef VERSION_INFO
|
||||
m.attr("__version__") = VERSION_INFO;
|
||||
|
||||
Reference in New Issue
Block a user