pybind11_demo/README.md

19 lines
349 B
Markdown
Raw Permalink Normal View History

2024-06-16 10:02:47 +00:00
# pybind11_demo
2024-06-16 10:10:40 +00:00
# A demo shows how to write python with c++
```python
# make.py
from pymake import *
(
cmake("3.15")
.set("PYBIND11_FINDPYTHON", on)
.set(cmake_export_compile_commands, on)
.project("test_pybind11")
.find_package("pybind11","REQUIRED")
.pybind11_add_module(var(project_name),"main.cpp")
.write()
)
```