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

Introduce SKBUILD_SABI_VERSION CMake variable #958

Closed
jcfr opened this issue Dec 6, 2024 · 3 comments · Fixed by #962
Closed

Introduce SKBUILD_SABI_VERSION CMake variable #958

jcfr opened this issue Dec 6, 2024 · 3 comments · Fixed by #962

Comments

@jcfr
Copy link
Contributor

jcfr commented Dec 6, 2024

To follow-up on https://github.com/orgs/scikit-build/discussions/1128#discussioncomment-11489351 answering a question from @minrk, I suggest we introduce the CMake cache variable SKBUILD_SABI_VERSION set from the value associated with the wheel.py-api setting.

Related documentation:

Related issues & pull requests:

@jcfr jcfr changed the title Introduce SKBUILD_SABI_VERSION CMake variable Introduce SKBUILD_SABI_VERSION CMake variable Dec 6, 2024
@jcfr
Copy link
Contributor Author

jcfr commented Dec 20, 2024

That way we could simply do the following:

if(NOT "${SKBUILD_SABI_COMPONENT}" STREQUAL "")
  python_add_library(some_ext MODULE WITH_SOABI USE_SABI ${SKBUILD_SABI_VERSION} ...)
else()
  python_add_library(some_ext MODULE WITH_SOABI ...)
endif()

@henryiii
Copy link
Collaborator

henryiii commented Dec 20, 2024

if(NOT "${SKBUILD_SABI_VERSION}" STREQUAL "")
  set(_sabi "USE_SABI ${SKBUILD_SABI_VERSION}")
endif()

python_add_library(some_ext MODULE WITH_SOABI ${_sabi})

@minrk
Copy link
Contributor

minrk commented Dec 20, 2024

That would be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants