Skip to content

Commit 55b1357

Browse files
authored
chore: update nox and test deps (#5594)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
1 parent 8ef10a0 commit 55b1357

File tree

4 files changed

+31
-21
lines changed

4 files changed

+31
-21
lines changed

.github/workflows/ci.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ jobs:
5252
args: >
5353
-DPYBIND11_FINDPYTHON=OFF
5454
-DCMAKE_CXX_FLAGS="-D_=1"
55+
-DPYBIND11_NUMPY_1_ONLY=ON
5556
exercise_D_: 1
5657
- runs-on: windows-2019
5758
python: '3.8'
@@ -65,6 +66,7 @@ jobs:
6566
python: '3.9'
6667
args: >
6768
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
69+
-DPYBIND11_NUMPY_1_ONLY=ON
6870
- runs-on: windows-2022
6971
python: '3.10'
7072
args: >
@@ -149,14 +151,12 @@ jobs:
149151

150152
# First build - C++11 mode and inplace
151153
# More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON here
152-
# (same for PYBIND11_NUMPY_1_ONLY, but requires a NumPy 1.x at runtime).
153154
- name: Configure C++11 ${{ matrix.args }}
154155
run: >
155156
cmake -S . -B .
156157
-DPYBIND11_WERROR=ON
157158
-DPYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION=ON
158159
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON
159-
-DPYBIND11_NUMPY_1_ONLY=ON
160160
-DPYBIND11_PYTEST_ARGS=-v
161161
-DDOWNLOAD_CATCH=ON
162162
-DDOWNLOAD_EIGEN=ON
@@ -180,13 +180,11 @@ jobs:
180180

181181
# Second build - C++17 mode and in a build directory
182182
# More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF here.
183-
# (same for PYBIND11_NUMPY_1_ONLY, but requires a NumPy 1.x at runtime).
184183
- name: Configure C++17
185184
run: >
186185
cmake -S . -B build2
187186
-DPYBIND11_WERROR=ON
188187
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
189-
-DPYBIND11_NUMPY_1_ONLY=ON
190188
-DPYBIND11_PYTEST_ARGS=-v
191189
-DDOWNLOAD_CATCH=ON
192190
-DDOWNLOAD_EIGEN=ON

noxfile.py

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1+
#!/usr/bin/env -S uv run
2+
3+
# /// script
4+
# dependencies = ["nox>=2025.2.9"]
5+
# ///
6+
17
from __future__ import annotations
28

39
import argparse
410

511
import nox
612

7-
nox.needs_version = ">=2024.3.2"
8-
nox.options.sessions = ["lint", "tests", "tests_packaging"]
13+
nox.needs_version = ">=2025.2.9"
914
nox.options.default_venv_backend = "uv|virtualenv"
1015

1116

@@ -49,7 +54,7 @@ def tests_packaging(session: nox.Session) -> None:
4954
session.run("pytest", "tests/extra_python_package", *session.posargs)
5055

5156

52-
@nox.session(reuse_venv=True)
57+
@nox.session(reuse_venv=True, default=False)
5358
def docs(session: nox.Session) -> None:
5459
"""
5560
Build the docs. Pass --non-interactive to avoid serving.
@@ -83,16 +88,15 @@ def docs(session: nox.Session) -> None:
8388
session.run("sphinx-build", "--keep-going", *shared_args)
8489

8590

86-
@nox.session(reuse_venv=True)
91+
@nox.session(reuse_venv=True, default=False)
8792
def make_changelog(session: nox.Session) -> None:
8893
"""
8994
Inspect the closed issues and make entries for a changelog.
9095
"""
91-
session.install("ghapi", "rich")
92-
session.run("python", "tools/make_changelog.py")
96+
session.install_and_run_script("tools/make_changelog.py")
9397

9498

95-
@nox.session(reuse_venv=True)
99+
@nox.session(reuse_venv=True, default=False)
96100
def build(session: nox.Session) -> None:
97101
"""
98102
Build SDists and wheels.

tests/requirements.txt

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
--only-binary=:all:
2-
build~=1.0; python_version>="3.8"
2+
build>=1
33
numpy~=1.23.0; python_version=="3.8" and platform_python_implementation=="PyPy"
4-
numpy~=1.25.0; python_version=="3.9" and platform_python_implementation=='PyPy'
4+
numpy~=1.25.0; python_version=="3.9" and platform_python_implementation=="PyPy"
5+
numpy~=2.2.0; python_version=="3.10" and platform_python_implementation=="PyPy"
56
numpy~=1.26.0; platform_python_implementation=="GraalVM" and sys_platform=="linux"
6-
numpy~=1.21.5; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version>="3.8" and python_version<"3.10"
7-
numpy~=1.22.2; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version=="3.10"
8-
numpy~=1.26.0; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version>="3.11" and python_version<"3.13"
9-
pytest~=7.0
7+
numpy~=1.21.5; platform_python_implementation=="CPython" and python_version>="3.8" and python_version<"3.10"
8+
numpy~=1.22.2; platform_python_implementation=="CPython" and python_version=="3.10"
9+
numpy~=1.26.0; platform_python_implementation=="CPython" and python_version>="3.11" and python_version<"3.13"
10+
numpy~=2.2.0; platform_python_implementation=="CPython" and python_version=="3.13"
11+
pytest>=7
1012
pytest-timeout
11-
scipy~=1.5.4; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version<"3.10"
12-
scipy~=1.8.0; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version=="3.10" and sys_platform!='win32'
13-
scipy~=1.11.1; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version>="3.11" and python_version<"3.13" and sys_platform!='win32'
13+
scipy~=1.5.4; platform_python_implementation=="CPython" and python_version<"3.10"
14+
scipy~=1.8.0; platform_python_implementation=="CPython" and python_version=="3.10" and sys_platform!="win32"
15+
scipy~=1.11.1; platform_python_implementation=="CPython" and python_version>="3.11" and python_version<"3.13" and sys_platform!="win32"
16+
scipy~=1.15.2; platform_python_implementation=="CPython" and python_version=="3.13" and sys_platform!="win32"

tools/make_changelog.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env -S uv run
2+
3+
# /// script
4+
# dependencies = ["ghapi", "rich"]
5+
# ///
6+
27
from __future__ import annotations
38

49
import re

0 commit comments

Comments
 (0)