Skip to content

Update CDT to 1.4.5, bump pybind11 to v3.0.4, add CI#10

Merged
artem-ogre merged 2 commits into
masterfrom
update-cdt-1.4.5
Jul 22, 2026
Merged

Update CDT to 1.4.5, bump pybind11 to v3.0.4, add CI#10
artem-ogre merged 2 commits into
masterfrom
update-cdt-1.4.5

Conversation

@artem-ogre

Copy link
Copy Markdown
Owner

Updates the bindings to the latest CDT release and adds CI.

Version bumps

  • CDT 1.4.0 → 1.4.5 (58f34da2068d01, tip of master)
  • pybind11 2.12.0.dev1 → v3.0.4

cdt_bindings.cpp needed no changes for either — the public API it uses is source-compatible.

Note that CDT 1.4.0 no longer configures under CMake 4.x, so this bump is also what keeps the project buildable on current toolchains.

Re-baselined golden checksums

The MD5 checks over the OFF output changed. These were not updated blind — both versions were built and compared on canonical geometry (triangles keyed by vertex coordinates, so the comparison is invariant to reordering):

  • Cases calling erase_* (Constrained Sweden, ditch): geometry identical, only output ordering changed.
  • The remaining cases: the only differing triangles were ones touching super-triangle vertices. Restricted to triangles built from real input vertices, the output is identical.
  • All cases still pass verify_topology().

The cause is CDT's super-triangle sizing fix (#173). Upstream corroborates this: CDT re-baselined 31 of its own expected files across 1.4.0..1.4.5, all with matching insertion/deletion counts.

Fixes found along the way

  • Wrong Python could be selected at build time. pybind11 3.x defaults to CMake's FindPython, which reads Python_EXECUTABLE, but setup.py only passed PYTHON_EXECUTABLE. The CMake cache confirmed it silently picked the system interpreter instead of the target one. Harmless when the ABIs happen to match, but in a CI matrix it would build a wheel against the wrong Python headers. Both spellings are now passed.
  • PythonCDT.__version__ always reported "dev". VERSION_INFO was never turned into a compile definition and MACRO_STRINGIFY was never defined (leftovers from the pybind11 example scaffold). Now wired up, with a regression test.
  • testpaths pointed at a nonexistent tests/ dir, so a bare pytest failed (filterwarnings = ["error"] promotes the resulting config warning). Fixed here and in the cibuildwheel test-command.

Version

Set to 1.4.5 in both setup.py and CMakeLists.txt to track CDT, and now surfaced as PythonCDT.__version__. The stale DESCRIPTION in CMakeLists.txt ("Software surface data rasterizer library") was corrected at the same time.

CI

New workflow on PRs and pushes to master: checks out submodules recursively, builds the wheel, installs it, runs the tests against the installed artifact, and uploads the wheel. push is scoped to master so PR branches don't run twice.

Matrix: ubuntu/macos/windows × Python 3.10/3.13.

Testing

All 14 tests pass locally (Linux, CPython 3.12), and the exact CI step sequence was validated end-to-end. The macOS, Windows, and 3.13 legs are unexercised until this PR's first CI run.

- CDT 1.4.0 -> 1.4.5 and pybind11 2.12.0.dev1 -> v3.0.4. The bindings
  themselves needed no source changes.
- Re-baseline the golden OFF checksums. Only the internal super-triangle
  scaffold changed (CDT #173): the mesh over the real input vertices is
  identical and every case still passes verify_topology. Upstream CDT
  re-baselined its own 31 expected files over the same range.
- Set the version to 1.4.5 to track CDT, and wire it through to
  PythonCDT.__version__, which always reported "dev" because
  VERSION_INFO was never defined and MACRO_STRINGIFY was missing.
- Pass Python_EXECUTABLE alongside PYTHON_EXECUTABLE: pybind11 >= 3
  defaults to CMake's FindPython and would otherwise build against an
  unrelated interpreter's headers.
- Point testpaths and the cibuildwheel test-command at the actual test
  file; they referenced a tests/ dir that does not exist, which made a
  bare `pytest` run fail.
- Add GitHub Actions CI that builds the wheel and runs the tests on
  ubuntu/macos/windows against Python 3.10 and 3.13.
@artem-ogre artem-ogre self-assigned this Jul 22, 2026
Replaces the placeholder metadata: description was "Test", the long
description was empty, and the author was a leftover from the project's
origin. Adds the project URLs, license, classifiers and keywords, and
uses README.md as the long description.

The README is read with an explicit utf-8 encoding because it contains
non-ASCII characters that would fail to decode under the default locale
on Windows.

Also raises python_requires from 3.6 to 3.8, which is the floor for the
pybind11 3.x now used to build the extension.
@artem-ogre
artem-ogre merged commit 0fb0e7e into master Jul 22, 2026
6 checks passed
@artem-ogre
artem-ogre deleted the update-cdt-1.4.5 branch July 22, 2026 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant