Skip to content

ci: add πthon wheels for nightlies #1018

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/emscripten.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ concurrency:
jobs:
build-pyodide:
name: Pyodide cibuildwheel
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0

- uses: pypa/cibuildwheel@v2.23
- uses: pypa/cibuildwheel@v3.0.0b5
env:
CIBW_PLATFORM: pyodide

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,9 @@ jobs:

- uses: astral-sh/setup-uv@v6

- uses: pypa/cibuildwheel@v2.23
- uses: pypa/cibuildwheel@v3.0.0b5
with:
only: "${{ matrix.only }}"
env:
CIBW_BUILD_VERBOSITY: 1

- uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ jobs:
arch: auto64
build: "*"

- os: windows-2019
- os: windows-latest
arch: auto64
build: "cp*"

- os: windows-2019
- os: windows-latest
arch: auto64
build: "pp*"
build: "{p,g}p*"

- os: windows-2019
- os: windows-latest
arch: auto32
build: "*"

Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:

- uses: astral-sh/setup-uv@v6

- uses: pypa/cibuildwheel@v2.23
- uses: mhsmith/cibuildwheel@android
env:
CIBW_BUILD: ${{ matrix.build }}
CIBW_ARCHS: ${{ matrix.arch }}
Expand Down
31 changes: 19 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["scikit-build-core>=0.11", "pybind11>=2.13.3"]
requires = ["scikit-build-core>=0.11", "pybind11==3.0.0rc2"]
build-backend = "scikit_build_core.build"

[project]
Expand Down Expand Up @@ -37,6 +37,7 @@ classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python",
Expand Down Expand Up @@ -120,6 +121,7 @@ sdist.exclude = [
"extern/pybind11/tests/**",
"extern/*/README.md",
]
logging.level = "INFO"

[[tool.scikit-build.generate]]
path = "boost_histogram/version.py"
Expand Down Expand Up @@ -173,23 +175,22 @@ ignore_missing_imports = true
[tool.cibuildwheel]
build-frontend = "build[uv]"
test-groups = ["test"]
test-command = "pytest -n auto --benchmark-disable {project}/tests"
skip = [
"pp38-*",
]
test-command = "python -m pytest -n auto --benchmark-disable {project}/tests"
test-skip = [
"cp*-musllinux_*", # Segfaults
"cp313t-win*",
"pp311-*", # no numpy wheels
"cp*-win_arm64", # no numpy wheels
"cp3{9,10}-win_arm64",
"cp3{9,10}-musllinux_*",
"pp310-manylinux_aarch64",
"pp310-macosx_arm64",
"cp31*-musllinux_*", # Threading test crashes
]
enable = ["cpython-freethreading", "pypy"]
enable = ["cpython-freethreading", "pypy", "cpython-prerelease"]
environment-pass = ["SETUPTOOLS_SCM_PRETEND_VERSION"]
environment.PIP_ONLY_BINARY = "numpy"
environment.PIP_PREFER_BINARY = "1"
environment.UV_ONLY_BINARY = "numpy"
environment.UV_PREFER_BINARY = "1"

[[tool.cibuildwheel.overrides]]
select = "*pyodide*"
[tool.cibuildwheel.pyodide]
build-frontend = {name = "build", args = ["--exports", "whole_archive"]}
test-command = "pytest --benchmark-disable {project}/tests"

Expand All @@ -198,6 +199,12 @@ select = "pp310-macosx_arm64"
inherit.environment = "append"
environment.MACOSX_DEPLOYMENT_TARGET = "14.0"

[[tool.cibuildwheel.overrides]]
select = ["cp314*", "pp311*", "cp*-musllinux_*", "cp31*-win_arm64"]
inherit.environment = "append"
environment.UV_EXTRA_INDEX_URL = "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/"
environment.UV_INDEX_STRATEGY = "unsafe-best-match"
environment.UV_PRERELEASE = "allow"

[tool.pylint]
py-version = "3.9"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import copy
import ctypes
import math
import platform
import sys
from pickle import dumps, loads

import numpy as np
Expand Down Expand Up @@ -188,7 +188,7 @@ def test_histogram_metadata(copy_fn, metadata):


@pytest.mark.skipif(
platform.python_implementation() == "PyPy",
sys.implementation.name == "pypy",
reason="Not remotely supported on PyPY, hangs forever",
)
@pytest.mark.parametrize("mod", [np, math])
Expand Down