Skip to content

Add linux wheel for 3.12#686

Open
goatsweater wants to merge 1 commit into
scikit-learn-contrib:masterfrom
goatsweater:master
Open

Add linux wheel for 3.12#686
goatsweater wants to merge 1 commit into
scikit-learn-contrib:masterfrom
goatsweater:master

Conversation

@goatsweater
Copy link
Copy Markdown

Adds Python 3.12 to the list of linux wheels to build.

Adds Python 3.12 to the list of linux wheels to build.
Mokto added a commit to Mokto/hdbscan that referenced this pull request May 8, 2026
The published wheels haven't kept up: the Linux job pinned `cython<3`
inside a `manylinux2014` container and built only cp38-cp311, leaving
no upstream wheels for 3.12+ and producing artifacts incompatible with
NumPy 2.x. This PR brings the build chain forward.

Build system
- `[build-system]` now requires `cython>=3.0.11,<4` and `numpy>=2.0,<3`
  so any source build (CI, conda-forge, end-user `pip install`) targets
  current Cython/NumPy.
- `requires-python = ">=3.10"` matches the supported matrix; 3.8 reached
  EOL on 2024-10-07 and 3.9 on 2025-10-31.
- Adds the `Programming Language :: Python :: 3.14` classifier.

Cython 3 source updates
- Reorders `nogil except -1` -> `except -1 nogil` across `.pyx`/`.pxd`
  (Cython 3 syntax requirement).
- Adds `# distutils: define_macros=NPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION`
  to silence NumPy deprecated-API warnings at compile time.

These rebases the still-relevant source-file hunks of scikit-learn-contrib#691 onto current
master; scikit-learn-contrib#691's pyproject/setup.py hunks have been superseded by master.

Wheel CI (`.github/workflows/pythonpublish_wheel.yml`)
- Linux: bumps the manylinux image from `manylinux2014_x86_64` to
  `manylinux_2_28_x86_64` (Python 3.14 needs glibc >= 2.28), pins
  `cython>=3.0.11,<4` and `numpy>=2.0` in the build env, installs
  `setuptools` + `wheel` (the cp314 image doesn't ship them by default),
  and extends the matrix to cp310-cp314.
- Windows/macOS: replaces the deprecated `oldest-supported-numpy` with
  `numpy>=2.0`, bumps `actions/checkout`@v1->v4 and
  `actions/setup-python`@v1->v5 (v1 doesn't support recent Pythons),
  retires the EOL `windows-2019`/`macos-11` runners (now
  `windows-2022` + `macos-14` -- macOS 14 already produces universal2
  wheels covering both arm64 and x86_64), extends the matrix to
  3.10-3.14, and enables `allow-prereleases: true` in case 3.14 isn't
  GA on a runner yet.
- Disables `fail-fast` on both matrices so one failure doesn't cancel
  the rest.

Verification
- All 15 build jobs (Linux cp310-cp314, Windows + macOS for 3.10-3.14)
  go green on a workflow_dispatch run on the fork.
- Locally on Python 3.14.4 with Cython 3.2.4 + NumPy 2.4.4: every
  extension cythonizes and compiles cleanly, and `HDBSCAN().fit(X)`
  runs end-to-end.

This is consistent with how conda-forge already ships working py314
builds of this package. Closes scikit-learn-contrib#688 (missing wheels for 3.13), scikit-learn-contrib#686
(Linux wheel for 3.12). Supersedes scikit-learn-contrib#691 for the parts still needed.
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