mirror of
https://github.com/pybind/pybind11.git
synced 2026-04-25 01:09:17 +00:00
chore: update nox and test deps (#5594)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -52,6 +52,7 @@ jobs:
|
|||||||
args: >
|
args: >
|
||||||
-DPYBIND11_FINDPYTHON=OFF
|
-DPYBIND11_FINDPYTHON=OFF
|
||||||
-DCMAKE_CXX_FLAGS="-D_=1"
|
-DCMAKE_CXX_FLAGS="-D_=1"
|
||||||
|
-DPYBIND11_NUMPY_1_ONLY=ON
|
||||||
exercise_D_: 1
|
exercise_D_: 1
|
||||||
- runs-on: windows-2019
|
- runs-on: windows-2019
|
||||||
python: '3.8'
|
python: '3.8'
|
||||||
@@ -65,6 +66,7 @@ jobs:
|
|||||||
python: '3.9'
|
python: '3.9'
|
||||||
args: >
|
args: >
|
||||||
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
|
-DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded
|
||||||
|
-DPYBIND11_NUMPY_1_ONLY=ON
|
||||||
- runs-on: windows-2022
|
- runs-on: windows-2022
|
||||||
python: '3.10'
|
python: '3.10'
|
||||||
args: >
|
args: >
|
||||||
@@ -149,14 +151,12 @@ jobs:
|
|||||||
|
|
||||||
# First build - C++11 mode and inplace
|
# First build - C++11 mode and inplace
|
||||||
# More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON here
|
# More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON here
|
||||||
# (same for PYBIND11_NUMPY_1_ONLY, but requires a NumPy 1.x at runtime).
|
|
||||||
- name: Configure C++11 ${{ matrix.args }}
|
- name: Configure C++11 ${{ matrix.args }}
|
||||||
run: >
|
run: >
|
||||||
cmake -S . -B .
|
cmake -S . -B .
|
||||||
-DPYBIND11_WERROR=ON
|
-DPYBIND11_WERROR=ON
|
||||||
-DPYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION=ON
|
-DPYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION=ON
|
||||||
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON
|
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=ON
|
||||||
-DPYBIND11_NUMPY_1_ONLY=ON
|
|
||||||
-DPYBIND11_PYTEST_ARGS=-v
|
-DPYBIND11_PYTEST_ARGS=-v
|
||||||
-DDOWNLOAD_CATCH=ON
|
-DDOWNLOAD_CATCH=ON
|
||||||
-DDOWNLOAD_EIGEN=ON
|
-DDOWNLOAD_EIGEN=ON
|
||||||
@@ -180,13 +180,11 @@ jobs:
|
|||||||
|
|
||||||
# Second build - C++17 mode and in a build directory
|
# Second build - C++17 mode and in a build directory
|
||||||
# More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF here.
|
# More-or-less randomly adding -DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF here.
|
||||||
# (same for PYBIND11_NUMPY_1_ONLY, but requires a NumPy 1.x at runtime).
|
|
||||||
- name: Configure C++17
|
- name: Configure C++17
|
||||||
run: >
|
run: >
|
||||||
cmake -S . -B build2
|
cmake -S . -B build2
|
||||||
-DPYBIND11_WERROR=ON
|
-DPYBIND11_WERROR=ON
|
||||||
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
|
-DPYBIND11_SIMPLE_GIL_MANAGEMENT=OFF
|
||||||
-DPYBIND11_NUMPY_1_ONLY=ON
|
|
||||||
-DPYBIND11_PYTEST_ARGS=-v
|
-DPYBIND11_PYTEST_ARGS=-v
|
||||||
-DDOWNLOAD_CATCH=ON
|
-DDOWNLOAD_CATCH=ON
|
||||||
-DDOWNLOAD_EIGEN=ON
|
-DDOWNLOAD_EIGEN=ON
|
||||||
|
|||||||
18
noxfile.py
18
noxfile.py
@@ -1,11 +1,16 @@
|
|||||||
|
#!/usr/bin/env -S uv run
|
||||||
|
|
||||||
|
# /// script
|
||||||
|
# dependencies = ["nox>=2025.2.9"]
|
||||||
|
# ///
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
import nox
|
import nox
|
||||||
|
|
||||||
nox.needs_version = ">=2024.3.2"
|
nox.needs_version = ">=2025.2.9"
|
||||||
nox.options.sessions = ["lint", "tests", "tests_packaging"]
|
|
||||||
nox.options.default_venv_backend = "uv|virtualenv"
|
nox.options.default_venv_backend = "uv|virtualenv"
|
||||||
|
|
||||||
|
|
||||||
@@ -49,7 +54,7 @@ def tests_packaging(session: nox.Session) -> None:
|
|||||||
session.run("pytest", "tests/extra_python_package", *session.posargs)
|
session.run("pytest", "tests/extra_python_package", *session.posargs)
|
||||||
|
|
||||||
|
|
||||||
@nox.session(reuse_venv=True)
|
@nox.session(reuse_venv=True, default=False)
|
||||||
def docs(session: nox.Session) -> None:
|
def docs(session: nox.Session) -> None:
|
||||||
"""
|
"""
|
||||||
Build the docs. Pass --non-interactive to avoid serving.
|
Build the docs. Pass --non-interactive to avoid serving.
|
||||||
@@ -83,16 +88,15 @@ def docs(session: nox.Session) -> None:
|
|||||||
session.run("sphinx-build", "--keep-going", *shared_args)
|
session.run("sphinx-build", "--keep-going", *shared_args)
|
||||||
|
|
||||||
|
|
||||||
@nox.session(reuse_venv=True)
|
@nox.session(reuse_venv=True, default=False)
|
||||||
def make_changelog(session: nox.Session) -> None:
|
def make_changelog(session: nox.Session) -> None:
|
||||||
"""
|
"""
|
||||||
Inspect the closed issues and make entries for a changelog.
|
Inspect the closed issues and make entries for a changelog.
|
||||||
"""
|
"""
|
||||||
session.install("ghapi", "rich")
|
session.install_and_run_script("tools/make_changelog.py")
|
||||||
session.run("python", "tools/make_changelog.py")
|
|
||||||
|
|
||||||
|
|
||||||
@nox.session(reuse_venv=True)
|
@nox.session(reuse_venv=True, default=False)
|
||||||
def build(session: nox.Session) -> None:
|
def build(session: nox.Session) -> None:
|
||||||
"""
|
"""
|
||||||
Build SDists and wheels.
|
Build SDists and wheels.
|
||||||
|
|||||||
@@ -1,13 +1,16 @@
|
|||||||
--only-binary=:all:
|
--only-binary=:all:
|
||||||
build~=1.0; python_version>="3.8"
|
build>=1
|
||||||
numpy~=1.23.0; python_version=="3.8" and platform_python_implementation=="PyPy"
|
numpy~=1.23.0; python_version=="3.8" and platform_python_implementation=="PyPy"
|
||||||
numpy~=1.25.0; python_version=="3.9" and platform_python_implementation=='PyPy'
|
numpy~=1.25.0; python_version=="3.9" and platform_python_implementation=="PyPy"
|
||||||
|
numpy~=2.2.0; python_version=="3.10" and platform_python_implementation=="PyPy"
|
||||||
numpy~=1.26.0; platform_python_implementation=="GraalVM" and sys_platform=="linux"
|
numpy~=1.26.0; platform_python_implementation=="GraalVM" and sys_platform=="linux"
|
||||||
numpy~=1.21.5; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version>="3.8" and python_version<"3.10"
|
numpy~=1.21.5; platform_python_implementation=="CPython" and python_version>="3.8" and python_version<"3.10"
|
||||||
numpy~=1.22.2; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version=="3.10"
|
numpy~=1.22.2; platform_python_implementation=="CPython" and python_version=="3.10"
|
||||||
numpy~=1.26.0; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version>="3.11" and python_version<"3.13"
|
numpy~=1.26.0; platform_python_implementation=="CPython" and python_version>="3.11" and python_version<"3.13"
|
||||||
pytest~=7.0
|
numpy~=2.2.0; platform_python_implementation=="CPython" and python_version=="3.13"
|
||||||
|
pytest>=7
|
||||||
pytest-timeout
|
pytest-timeout
|
||||||
scipy~=1.5.4; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version<"3.10"
|
scipy~=1.5.4; platform_python_implementation=="CPython" and python_version<"3.10"
|
||||||
scipy~=1.8.0; platform_python_implementation!="PyPy" and platform_python_implementation!="GraalVM" and python_version=="3.10" and sys_platform!='win32'
|
scipy~=1.8.0; platform_python_implementation=="CPython" and python_version=="3.10" and sys_platform!="win32"
|
||||||
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'
|
scipy~=1.11.1; platform_python_implementation=="CPython" and python_version>="3.11" and python_version<"3.13" and sys_platform!="win32"
|
||||||
|
scipy~=1.15.2; platform_python_implementation=="CPython" and python_version=="3.13" and sys_platform!="win32"
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env -S uv run
|
||||||
|
|
||||||
|
# /// script
|
||||||
|
# dependencies = ["ghapi", "rich"]
|
||||||
|
# ///
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|||||||
Reference in New Issue
Block a user