mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
docs: prepare for v3.0.0rc1 (#5589)
* Squashed prepv300/manuscript — 30b9c268aeb98308ea42aaccfd5fe454e173c6fc — 2025-03-30 14:56:03 -0700 [skip ci] [Browse prepv300/manuscript tree](30b9c268ae) [Browse prepv300/manuscript commits](30b9c268ae/) * docs: update changelog Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * docs: upgrade guide CMake suggestions Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Explain type_caster_enum_type_enabled, copyable_holder_caster_shared_ptr_with_smart_holder_support_enabled, move_only_holder_caster_unique_ptr_with_smart_holder_support_enabled in Upgrade guide. * Add a small section for py::bind_vector, py::bind_map & py::smart_holder * Fix tiny oversight: Reference back to the current release v2.13 (not v2.12) * Remove sentence: Using self._pybind11_conduit_v1_() ... should keep extension compatibility. This isn't true, because we also modernized `PYBIND11_PLATFORM_ABI_ID` (which I believe was absolutely necessary). I think it'll be too complicated to explain that here, and there is a mention in the Upgrade guide. * Changelog: combine #4953 and #5439 * Trivial whitespace/formatting fixes/enhancements. * chore: add more to deprecation page Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * docs: update for recent additions Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * docs: fixes and set rc1 version Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * fix: support rc versions Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Undo erroneous copilot change: We need to use `detail::enable_if_t`, for compatibility with C++11 and C++14. * Empty lines cleanup. * Rewording of "CMake support now defaults to ..." paragraph. * Add missing backticks in upgrade guide. * Try :ref:deprecated instead of :doc:deprecated * docs: last bit of polish Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * Piggy-back trivial whitespace cleanup that was missed in PR #5669 --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
committed by
GitHub
parent
cc86e8b2a6
commit
4587d33cf9
@@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
|
||||
import contextlib
|
||||
import os
|
||||
import re
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -15,6 +16,7 @@ from typing import Generator
|
||||
DIR = Path(__file__).parent.resolve()
|
||||
MAIN_DIR = DIR.parent.parent
|
||||
|
||||
FILENAME_VERSION = re.compile(r"[-_]((\d+\.\d+\.\d+)(?:[a-z]+\d*)?)(?:-|\.tar\.gz$)")
|
||||
|
||||
# Newer pytest has global path setting, but keeping old pytest for now
|
||||
sys.path.append(str(MAIN_DIR / "tools"))
|
||||
@@ -184,7 +186,7 @@ def test_build_sdist(monkeypatch, tmpdir):
|
||||
)
|
||||
|
||||
(sdist,) = tmpdir.visit("*.tar.gz")
|
||||
version = sdist.basename.split("-")[1][:-7]
|
||||
version = FILENAME_VERSION.search(sdist.basename).group(1)
|
||||
|
||||
with tarfile.open(str(sdist), "r:gz") as tar:
|
||||
simpler = {n.split("/", 1)[-1] for n in tar.getnames()[1:]}
|
||||
@@ -197,6 +199,7 @@ def test_build_sdist(monkeypatch, tmpdir):
|
||||
assert files <= simpler
|
||||
|
||||
assert b'name = "pybind11"' in pyproject_toml
|
||||
assert f"Version: {version}" in pkg_info
|
||||
assert "License-Expression: BSD-3-Clause" in pkg_info
|
||||
assert "License-File: LICENSE" in pkg_info
|
||||
assert "Provides-Extra: global" in pkg_info
|
||||
@@ -220,6 +223,7 @@ def test_build_global_dist(monkeypatch, tmpdir):
|
||||
)
|
||||
|
||||
(sdist,) = tmpdir.visit("*.tar.gz")
|
||||
version = FILENAME_VERSION.search(sdist.basename).group(2)
|
||||
|
||||
with tarfile.open(str(sdist), "r:gz") as tar:
|
||||
simpler = {n.split("/", 1)[-1] for n in tar.getnames()[1:]}
|
||||
@@ -232,6 +236,7 @@ def test_build_global_dist(monkeypatch, tmpdir):
|
||||
assert files <= simpler
|
||||
|
||||
assert b'name = "pybind11-global"' in pyproject_toml
|
||||
assert f"Version: {version}" in pkg_info
|
||||
assert "License-Expression: BSD-3-Clause" in pkg_info
|
||||
assert "License-File: LICENSE" in pkg_info
|
||||
assert "Provides-Extra: global" not in pkg_info
|
||||
@@ -247,6 +252,7 @@ def tests_build_wheel(monkeypatch, tmpdir):
|
||||
)
|
||||
|
||||
(wheel,) = tmpdir.visit("*.whl")
|
||||
version, simple_version = FILENAME_VERSION.search(wheel.basename).groups()
|
||||
|
||||
files = {f"pybind11/{n}" for n in all_files}
|
||||
files |= {
|
||||
@@ -274,11 +280,10 @@ def tests_build_wheel(monkeypatch, tmpdir):
|
||||
|
||||
assert 'set(pybind11_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")' in cmakeconfig
|
||||
|
||||
version = wheel.basename.split("-")[1]
|
||||
simple_version = ".".join(version.split(".")[:3])
|
||||
pkgconfig_expected = PKGCONFIG.format(VERSION=simple_version)
|
||||
assert pkgconfig_expected == pkgconfig
|
||||
|
||||
assert f"Version: {version}" in pkg_info
|
||||
assert "License-Expression: BSD-3-Clause" in pkg_info
|
||||
assert "License-File: LICENSE" in pkg_info
|
||||
assert "Provides-Extra: global" in pkg_info
|
||||
@@ -302,6 +307,7 @@ def tests_build_global_wheel(monkeypatch, tmpdir):
|
||||
)
|
||||
|
||||
(wheel,) = tmpdir.visit("*.whl")
|
||||
version, simple_version = FILENAME_VERSION.search(wheel.basename).groups()
|
||||
|
||||
files = {f"data/data/{n}" for n in headers}
|
||||
files |= {f"data/headers/{n[8:]}" for n in headers}
|
||||
@@ -326,6 +332,7 @@ def tests_build_global_wheel(monkeypatch, tmpdir):
|
||||
(pkg_info_path,) = (n for n in names if n.endswith("METADATA"))
|
||||
pkg_info = zipfile.Path(z, pkg_info_path).read_text(encoding="utf-8")
|
||||
|
||||
assert f"Version: {version}" in pkg_info
|
||||
assert "License-Expression: BSD-3-Clause" in pkg_info
|
||||
assert "License-File: LICENSE" in pkg_info
|
||||
assert "Provides-Extra: global" not in pkg_info
|
||||
@@ -337,7 +344,5 @@ def tests_build_global_wheel(monkeypatch, tmpdir):
|
||||
|
||||
assert 'set(pybind11_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include")' in cmakeconfig
|
||||
|
||||
version = wheel.basename.split("-")[1]
|
||||
simple_version = ".".join(version.split(".")[:3])
|
||||
pkgconfig_expected = PKGCONFIG.format(VERSION=simple_version)
|
||||
assert pkgconfig_expected == pkgconfig
|
||||
|
||||
Reference in New Issue
Block a user