Repository navigation
[RELEASE ONLY CHANGES] Use the build Python with pybind11 FindPython - #231
Merged
JacobSzwejbka merged 1 commit intoOct 28, 2026
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release-only follow-up to #230 for pytorch-tokenizers 1.6.0. Do not merge to main.
Pass the active build interpreter through FindPython's Python_EXECUTABLE variable. pybind11 3.1.0 uses FindPython; the legacy all-caps PYTHON_EXECUTABLE input is ignored, allowing CMake to compile for a different installed Python than the one setuptools uses to label the wheel.
A local Python 3.15 build reproduced this: the wheel was labeled cp315 but contained pytorch_tokenizers_cpp.cpython-314-darwin.so, and the installed-wheel smoke test failed to import the extension. CMakeCache.txt showed PYTHON_EXECUTABLE pointing at the 3.15 build interpreter while Python_EXECUTABLE resolved to the host's Python 3.14. This change explicitly supplies sys.executable using the variable pybind11 reads, preventing that mismatch across the release wheel matrix.
Python syntax, Black 24.4.2 and git diff --check pass. The clean local Python 3.15 rebuild and RC1's full installed-wheel smoke-test matrix validate the extension ABI before final publication.
Authored with Codex assistance.