From 4093f0804d4da1377273b101ec9a55c553b41e14 Mon Sep 17 00:00:00 2001 From: ZtRXR Date: Sun, 16 Jun 2024 18:10:40 +0800 Subject: [PATCH] update readme --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 37b62fd..2556ef6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,19 @@ # pybind11_demo +# 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() +) +``` \ No newline at end of file