Skip to content

build: modernize build system, dependencies and CI - #91

Merged
oberbichler merged 2 commits into
masterfrom
modernize
Jul 26, 2026
Merged

build: modernize build system, dependencies and CI#91
oberbichler merged 2 commits into
masterfrom
modernize

Conversation

@oberbichler

@oberbichler oberbichler commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

The project no longer built on current toolchains (CMake 4, Python 3.11+). This PR modernizes the entire build, dependency and release setup — +280/−252,550 lines, most of it removed vendored libraries.

Build & packaging

  • setup.py/distutils (removed in Python 3.12) replaced with pyproject.toml + scikit-build-core
  • Version derived from git tags via setuptools-scm (replaces pumpit)
  • CMake modernized: 3.24+, target-based includes/definitions

Dependencies

  • Eigen 3.4, fmt 11, spdlog 1.15 and robin-map fetched via FetchContent instead of vendoring (~11 MB removed from the repo); only the frozen hyperjet copy stays vendored
  • sparsehash droppeddense_hash_map replaced by tsl::robin_map
  • pybind11 comes from PyPI as a build requirement; code builds against pybind11 3.x and Python 3.12–3.14
  • OpenMP is now optional (build works on macOS without libomp)
  • Log.h/format use compile-time checked format strings (required by fmt 11)

CI/CD

  • CI: current actions, matrix Python 3.12–3.14 × Linux/Windows/macOS
  • Publish rewritten with cibuildwheel: current manylinux, first-time Linux-aarch64 and Apple-Silicon wheels, sdist, and PyPI Trusted Publishing (OIDC) instead of password secrets

Tests

  • Adapted to the current hyperjet API (hj.variables(...), .hm()); skipped via importorskip when hyperjet is unavailable
  • hyperjet is installed from GitHub master in CI — the PyPI release (1.5.0) no longer builds on modern Python

Verification

All 43 tests pass on Python 3.13 (macOS/arm64), both against a direct CMake build and against an install from the built sdist.

Notes

  • ⚠️ Before the next release: configure Trusted Publishing on PyPI (project → Publishing → add GitHub oberbichler/EQlib, workflow publish.yml, environment pypi)
  • Requires Python ≥ 3.12 (breaking for users on older versions)
  • Follow-up idea: release a modernized HyperJet to PyPI, then CI can install it normally

- replace setup.py/distutils with pyproject.toml + scikit-build-core
- version from git tags via setuptools-scm
- fetch Eigen 3.4, fmt 11, spdlog 1.15 and robin-map via FetchContent
  instead of vendoring (only hyperjet stays vendored)
- drop sparsehash (dense_hash_map -> tsl::robin_map)
- make OpenMP optional (fixes build on macOS without libomp)
- compile-time checked format strings (fmt 11 / spdlog 1.15)
- support Python 3.12-3.14, pybind11 3.x
- ci: current actions, Python 3.12-3.14 matrix
- publish: cibuildwheel + PyPI trusted publishing, arm64 wheels
- tests: adapt to current hyperjet API, skip if hyperjet missing

BREAKING CHANGE: requires Python >= 3.12
@oberbichler
oberbichler merged commit 69c35b5 into master Jul 26, 2026
9 checks passed
@oberbichler
oberbichler deleted the modernize branch July 26, 2026 17:27
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