Skip to content

[RELEASE ONLY CHANGES] Use the build Python with pybind11 FindPython - #231

Merged
JacobSzwejbka merged 1 commit into
release/1.6.0from
release-only/1.6.0-python-executable-20261028
Oct 28, 2026
Merged

JacobSzwejbka merged 1 commit into
release/1.6.0from
release-only/1.6.0-python-executable-20261028

Conversation

@JacobSzwejbka

Copy link
Copy Markdown
Contributor

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.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 28, 2026
@JacobSzwejbka
JacobSzwejbka merged commit 5ce23a0 into release/1.6.0 Oct 28, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant