Skip to content
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

update to 2.12.0 #15

Merged
merged 3 commits into from
Apr 3, 2024
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
2 changes: 1 addition & 1 deletion recipe/build-pybind11-global.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
:: https://github.com/conda/conda-build/blob/d75ef9c66dbcc832d8d96f33a2aecfe893266e8c/conda_build/build.py#L2517-L2527
set PYBIND11_GLOBAL_SDIST=1
set PYBIND11_GLOBAL_PREFIX=Library
%PYTHON% -m pip install . -vv --no-build-isolation
%PYTHON% -m pip install . -vv --no-build-isolation --no-deps
if errorlevel 1 exit 1
2 changes: 1 addition & 1 deletion recipe/build-pybind11-global.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# There are several required flags, like --no-deps, but conda-build nicely sets them for us
# https://github.com/conda/conda-build/blob/d75ef9c66dbcc832d8d96f33a2aecfe893266e8c/conda_build/build.py#L2517-L2527
export PYBIND11_GLOBAL_SDIST=1
$PYTHON -m pip install . -vv --no-build-isolation
$PYTHON -m pip install . -vv --no-build-isolation --no-deps
2 changes: 1 addition & 1 deletion recipe/build-pybind11.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:: There are several required flags, like --no-deps, but conda-build nicely sets them for us
:: https://github.com/conda/conda-build/blob/d75ef9c66dbcc832d8d96f33a2aecfe893266e8c/conda_build/build.py#L2517-L2527
%PYTHON% -m pip install . -vv --no-build-isolation
%PYTHON% -m pip install . -vv --no-build-isolation --no-deps
if errorlevel 1 exit 1
2 changes: 1 addition & 1 deletion recipe/build-pybind11.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# There are several required flags, like --no-deps, but conda-build nicely sets them for us
# https://github.com/conda/conda-build/blob/d75ef9c66dbcc832d8d96f33a2aecfe893266e8c/conda_build/build.py#L2517-L2527
$PYTHON -m pip install . -vv --no-build-isolation
$PYTHON -m pip install . -vv --no-build-isolation --no-deps
14 changes: 9 additions & 5 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
{% set version = "2.10.4" %}
{% set sha256 = "832e2f309c57da9c1e6d4542dedd34b24e4192ecb4d62f6f4866a737454c9970" %}
{% set version = "2.12.0" %}
{% set sha256 = "bf8f242abd1abcd375d516a7067490fb71abd79519a282d22b6e4d19282185a7" %}

# this is set to PYBIND11_INTERNALS_VERSION
{% set abi_version = "4" %}
{% set abi_buildnumber = "1" %}
# pybind11 now defines two ABI version. 4 and 5 for 3.12+ or msvc.
# https://github.com/pybind/pybind11/blob/v2.12.0/include/pybind11/detail/internals.h#L40
{% set abi_version = "4" %} # [py<312 and not win]
Copy link

@Jrice1317 Jrice1317 Apr 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the requirement that version 5 is used for py>=312 but I can't seem to find anything related to win being affected or not. Can you please point me in the right direction?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line has defined(_MSC_VER). (which can be read as if visual studio).
And the details are in this PR: pybind/pybind11#4779

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{% set abi_buildnumber = "1" %} # [py<312 and not win]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where does abi_buildnumber come from?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just the build number of the pybind11-abi package (line 28).

{% set abi_version = "5" %} # [py>=312 or win]
{% set abi_buildnumber = "0" %} # [py>=312 or win]

package:
name: pybind11-split
Expand Down Expand Up @@ -31,7 +35,7 @@ outputs:
- include/pybind11/detail/internals.h
commands:
# make sure the internals version matches the package version
- if [[ $(grep "#[[:blank:]]*define PYBIND11_INTERNALS_VERSION" include/pybind11/detail/internals.h | rev | cut -d' ' -f1) != "{{ abi_version }}" ]]; then exit 1; fi
- matched=false; while read -r version; do [ "$version" -eq "{{ abi_version }}" ] && { matched=true; break; }; done < <(awk '/define PYBIND11_INTERNALS_VERSION/{print $NF}' include/pybind11/detail/internals.h); [ "$matched" = true ] && exit 0 || exit 1

- name: pybind11-global
script: build-pybind11-global.sh # [unix]
Expand Down