blob: aa197a604a7b6733ab3269a4d0e760c2644cb0af [file] [edit]
[build-system]
requires = ["scikit_build_core >= 0.9.0", "nanobind"]
build-backend = "scikit_build_core.build"
[project]
name = "cascadio"
version = "0.1.1"
requires-python = ">=3.9"
authors = [{name = "Michael Dawson-Haggerty", email = "mikedh@kerfed.com"}]
license = {file = "LICENSE/LICENSE-cascadio.md"}
description = "Convert STEP files to GLB using OpenCASCADE"
keywords = ["graphics", "STEP", "GLTF"]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Natural Language :: English",
"Topic :: Scientific/Engineering",
"Topic :: Multimedia :: Graphics",
"Topic :: Multimedia :: Graphics :: 3D Modeling"
]
urls = {Homepage = "https://github.com/trimesh/cascadio"}
[project.readme]
file = "README.md"
content-type = "text/markdown"
[project.optional-dependencies]
tests = ["pytest", "trimesh", "chardet", "jsonschema"]
[tool.scikit-build]
wheel.packages = ["src/cascadio"]
wheel.exclude = ["**/__pycache__"]
wheel.py-api = "cp312"
# Include schema.json in the wheel
[tool.setuptools.package-data]
cascadio = ["schema.json"]
[tool.cibuildwheel]
# `yum` would need to be replaced in the `before-all`
# script before the musl linux can build OpenCASCADE
skip = "*musl* *win32*"
# Use manylinux_2_28 for GCC 12+ (needed for OCCT 8.x constexpr)
manylinux-x86_64-image = "manylinux_2_28"
manylinux-aarch64-image = "manylinux_2_28"
# Skip testing on i686 (32-bit is not supported)
test-skip = "*i686"
# Build OCCT (skips automatically if cached)
before-all = "pip install ninja cmake && python scripts/build_occt.py"
before-build = "pip install abi3audit"
test-extras = "tests"
test-command = "pytest {project}/tests"
[tool.cibuildwheel.linux]
before-all = "yum install -y bubblewrap && pip install ninja cmake && python scripts/build_occt.py"
container-engine = "docker; create_args: --privileged"
repair-wheel-command = [
"LD_LIBRARY_PATH=/project/upstream/OCCT/lin64/gcc/lib:/project/upstream/OCCT/lin32/gcc/lib auditwheel repair --exclude libGL.so.1 --lib-sdir . -w {dest_dir} {wheel}",
"bash scripts/audit_wheel.sh {wheel}"
]
# Run normal tests, then test with read-only root filesystem via bubblewrap
# Uses bwrap to create a read-only bind mount with /proc for memfd support
test-command = "pytest {project}/tests && bwrap --ro-bind / / --dev /dev --proc /proc --unshare-user --uid 1000 --gid 1000 python {project}/scripts/test_readonly.py"
[tool.cibuildwheel.windows]
before-build = "pip install delvewheel abi3audit"
repair-wheel-command = [
"delvewheel repair --add-path upstream/OCCT/win64/vc14/bin -w {dest_dir} {wheel}",
"bash scripts/audit_wheel.sh {wheel}"
]
[tool.cibuildwheel.macos]
# Require macOS 10.15+ for std::filesystem support
environment = { MACOSX_DEPLOYMENT_TARGET = "11.0" }
repair-wheel-command = [
"DYLD_LIBRARY_PATH=upstream/OCCT/mac64/clang/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}",
"bash scripts/audit_wheel.sh {wheel}"
]