build(build.py): build cpp src setting

This commit is contained in:
songsenand 2024-02-14 20:13:23 +08:00
parent aa2401dbd0
commit 9298a3e3d0
1 changed files with 24 additions and 0 deletions

24
build.py Normal file
View File

@ -0,0 +1,24 @@
from pybind11.setup_helpers import Pybind11Extension, build_ext
def build(setup_kwargs):
__version__ = "0.0.1"
ext_modules = [
Pybind11Extension(
"toydesigner-cgal",
sources=sorted(glob("tdcgal/*.cpp")),
define_macros=[("VERSION_INFO", __version__)],
include_dirs=["./cgal"],
),
]
setup_kwargs.update(
{
"version": __version__,
"author": "songsenand",
"author_email": "songsenand@163.com",
"ext_modules": ext_modules,
"cmd_class": {"build_ext": build_ext},
}
)