build(build.py): config build cgal-binding
This commit is contained in:
parent
8b86b72514
commit
0674af1e95
31
build.py
31
build.py
|
|
@ -1,24 +1,9 @@
|
||||||
from pybind11.setup_helpers import Pybind11Extension, build_ext
|
import warnings
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
res = subprocess.run(["python3", "setup.py", "build_ext", "--inplace"])
|
||||||
def build(setup_kwargs):
|
if res.returncode != 0:
|
||||||
__version__ = "0.0.1"
|
warnings.warn(res.stderr.decode())
|
||||||
|
warnings.warn("Error building toydesigner-cgal")
|
||||||
ext_modules = [
|
elif res.returncode == 0:
|
||||||
Pybind11Extension(
|
print("Successfully built toydesigner-cgal")
|
||||||
"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},
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue