Files
ViewDesignEngine/python/setup.py
T
茂之钳 7c2fb4b7c3
CI / Build & Test (push) Failing after 43s
CI / Release Build (push) Failing after 41s
Build & Test / build-and-test (push) Has been cancelled
Build & Test / python-bindings (push) Has been cancelled
feat(v3.2): CI/CD config + Python bindings setup
- Add .gitea/workflows/build.yml (build, test, docs, python binding CI)
- Add root pyproject.toml + setup.py (CMake-based pip install)
- Add root vde/__init__.py (Python package entry point)
- Update README: CI badge, version 3.2.0, Python install instructions
- Bump project version to 3.2.0 across CMakeLists.txt, python/setup.py, python/vde/__init__.py
- Add build_py/ to .gitignore
2026-07-24 11:33:09 +00:00

70 lines
2.1 KiB
Python

"""
ViewDesignEngine — CAD computational geometry engine.
Build and install:
pip install -e . # editable install
pip install . # regular install
Requires:
- CMake >= 3.16
- C++17 compiler
- Eigen3 (auto-fetched if not found)
"""
from setuptools import setup, find_packages
from pybind11.setup_helpers import Pybind11Extension, build_ext
import sys
from pathlib import Path
# ── Configure the native extension ──────────────────
ext_modules = [
Pybind11Extension(
"vde._vde",
sorted([
"src/bind_module.cpp",
"src/bind_core.cpp",
"src/bind_curves.cpp",
"src/bind_mesh.cpp",
]),
include_dirs=[
"../include", # vde headers
],
extra_compile_args=["-std=c++17"],
# Propagate Eigen3 (set up via CMake or system path)
cxx_std=17,
),
]
setup(
name="vde",
version="3.2.0",
author="ViewDesignEngine Contributors",
description="CAD computational geometry engine",
long_description=Path(__file__).parent.joinpath("..", "README.md").read_text(
encoding="utf-8"
) if Path(__file__).parent.joinpath("..", "README.md").exists() else "",
long_description_content_type="text/markdown",
url="https://github.com/ViewDesignEngine/ViewDesignEngine",
packages=find_packages(),
ext_modules=ext_modules,
cmdclass={"build_ext": build_ext},
python_requires=">=3.8",
install_requires=[
"pybind11>=2.11.0",
],
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Programming Language :: C++",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering",
],
zip_safe=False,
)