Skip to content

[python] Anchor the cpyrt header probe on the extension module - #25

Merged
aaronj0 merged 2 commits into
mainfrom
editable-cpyrt-probe
Aug 20, 2026
Merged

[python] Anchor the cpyrt header probe on the extension module#25
aaronj0 merged 2 commits into
mainfrom
editable-cpyrt-probe

Conversation

@aaronj0

@aaronj0 aaronj0 commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

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 (the cpyrt pip-distribution query via pkg_resources and the site/pythonX.Y layout guesses). CPPJIT_API_PATH still overrides and "none" still disables.

@github-actions

github-actions Bot commented Aug 18, 2026

Copy link
Copy Markdown

Test Results

Configuration Result
macos-26-intel-llvm21-py3.14-cxx20 = 437 passed, 44 skipped, 85 xfailed, 32 xpassed, 100 warnings in 94.54s (0:01:34) =
macos-26-llvm21-py3.14-cxx20 = 438 passed, 37 skipped, 93 xfailed, 30 xpassed, 100 warnings in 62.74s (0:01:02) =
ubuntu-24.04-llvm21-py3.14-cxx20-vg ====== 553 passed, 25 skipped, 18 xfailed, 2 xpassed in 72.24s (0:01:12) =======
ubuntu-24.04-llvm22-py3.14-cxx20 ====== 553 passed, 25 skipped, 19 xfailed, 1 xpassed in 120.52s (0:02:00) ======
ubuntu-24.04-llvm22-py3.14-cxx20-cling ====== 543 passed, 25 skipped, 27 xfailed, 3 xpassed in 89.44s (0:01:29) =======
ubuntu-24.04-llvm22-py3.14-cxx23 ====== 574 passed, 3 skipped, 20 xfailed, 1 xpassed in 124.64s (0:02:04) =======

Comment thread python/cppjit/__init__.py Outdated
@aaronj0
aaronj0 force-pushed the editable-cpyrt-probe branch 2 times, most recently from 9df3efe to 43fc649 Compare August 19, 2026 13:25
@aaronj0
aaronj0 requested a review from guitargeek August 19, 2026 13:57
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
aaronj0 force-pushed the editable-cpyrt-probe branch from 43fc649 to 4d59987 Compare August 19, 2026 18:29

@guitargeek guitargeek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM, thanks for the solid cleanup!

@aaronj0
aaronj0 merged commit 6082f4d into main Aug 20, 2026
9 checks passed
@aaronj0
aaronj0 deleted the editable-cpyrt-probe branch August 20, 2026 11:44
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 this pull request may close these issues.

3 participants