Tie PYBIND11_INTERNALS_VERSION 6 to PYBIND11_VERSION_MAJOR >= 3

This commit is contained in:
Ralf W. Grosse-Kunstleve 2024-07-20 19:57:52 -07:00
parent 89d0ddd6ff
commit 18b72c0ffa
3 changed files with 9 additions and 7 deletions

View File

@ -9,13 +9,13 @@
#pragma once #pragma once
#define PYBIND11_VERSION_MAJOR 2 #define PYBIND11_VERSION_MAJOR 3
#define PYBIND11_VERSION_MINOR 14 #define PYBIND11_VERSION_MINOR 0
#define PYBIND11_VERSION_PATCH 0.dev1 #define PYBIND11_VERSION_PATCH 0.dev1
// Similar to Python's convention: https://docs.python.org/3/c-api/apiabiversion.html // Similar to Python's convention: https://docs.python.org/3/c-api/apiabiversion.html
// Additional convention: 0xD = dev // Additional convention: 0xD = dev
#define PYBIND11_VERSION_HEX 0x020E00D1 #define PYBIND11_VERSION_HEX 0x030000D1
// Define some generic pybind11 helper macros for warning management. // Define some generic pybind11 helper macros for warning management.
// //

View File

@ -36,12 +36,14 @@
/// further ABI-incompatible changes may be made before the ABI is officially /// further ABI-incompatible changes may be made before the ABI is officially
/// changed to the new version. /// changed to the new version.
#ifndef PYBIND11_INTERNALS_VERSION #ifndef PYBIND11_INTERNALS_VERSION
# if PY_VERSION_HEX >= 0x030C0000 || defined(_MSC_VER) # if PYBIND11_VERSION_MAJOR >= 3
# define PYBIND11_INTERNALS_VERSION 6
# elif PY_VERSION_HEX >= 0x030C0000 || defined(_MSC_VER)
// Version bump for Python 3.12+, before first 3.12 beta release. // Version bump for Python 3.12+, before first 3.12 beta release.
// Version bump for MSVC piggy-backed on PR #4779. See comments there. // Version bump for MSVC piggy-backed on PR #4779. See comments there.
# define PYBIND11_INTERNALS_VERSION 6 // BAKEIN_WIP: Only do this for pybind11 v3.0.0 # define PYBIND11_INTERNALS_VERSION 5
# else # else
# define PYBIND11_INTERNALS_VERSION 6 // BAKEIN_WIP: Only do this for pybind11 v3.0.0 # define PYBIND11_INTERNALS_VERSION 4
# endif # endif
#endif #endif

View File

@ -8,5 +8,5 @@ def _to_int(s: str) -> int | str:
return s return s
__version__ = "2.14.0.dev1" __version__ = "3.0.0.dev1"
version_info = tuple(_to_int(s) for s in __version__.split(".")) version_info = tuple(_to_int(s) for s in __version__.split("."))