[python] Anchor the cpyrt header probe on the extension module - #25
Merged
Conversation
Test Results
|
aaronj0
force-pushed
the
editable-cpyrt-probe
branch
2 times, most recently
from
August 19, 2026 13:25
9df3efe to
43fc649
Compare
In editable installs the cpyrt header probe checked `__file__`, which maps to the source tree, so it missed the headers installed by scikit-build-core into site-packages and warned on every import. Now use the libcppjit extension's location, which resolves editable and regular installs identically. Also remove all dead lookups inherited with the probe (the `cpyrt` pip-distribution query via pkg_resources and the site/pythonX.Y layout guesses). `CPPJIT_API_PATH` still overrides and `"none"` still disables.
aaronj0
force-pushed
the
editable-cpyrt-probe
branch
from
August 19, 2026 18:29
43fc649 to
4d59987
Compare
guitargeek
approved these changes
Aug 20, 2026
guitargeek
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, thanks for the solid cleanup!
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.
In editable installs the cpyrt header probe checked
__file__, which maps to the source tree, so it missed the headers installed by scikit-build-core into site-packages and warned on every import. Now use the libcppjit extension's location, which resolves editable and regular installs identically. Also removes all dead lookups inherited with the probe (thecpyrtpip-distribution query via pkg_resources and the site/pythonX.Y layout guesses).CPPJIT_API_PATHstill overrides and"none"still disables.