Skip to content

Don't import cppyy before ROOT in cmdLineUtils #19037

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

Merged
merged 1 commit into from
Jun 16, 2025

Conversation

guitargeek
Copy link
Contributor

If you import cppyy before ROOT, you get these warnings by default:

/home/rembserj/code/root/root_install/lib/root/cppyy_backend/loader.py:147: UserWarning: No precompiled header available (cannot import name 'get_cppversion' from 'cppyy_backend._get_cppflags' (/home/rembserj/code/root/root_install/lib/root/cppyy_backend/_get_cppflags.py)); this may impact performance.
  warnings.warn('No precompiled header available (%s); this may impact performance.' % msg)
/home/rembserj/code/root/root_install/lib/root/cppyy/__init__.py:378: UserWarning: CPyCppyy API not found (tried: /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/include/site/python3.12); set CPPYY_API_PATH envar to the 'CPyCppyy' API directory to fix
  warnings.warn("CPyCppyy API not found (tried: %s); "

Doing the import locally, so it happens after import ROOT, avoids these warnings.

@guitargeek guitargeek requested a review from vepadulano June 13, 2025 18:17
@guitargeek guitargeek self-assigned this Jun 13, 2025
@guitargeek guitargeek requested a review from pcanal as a code owner June 13, 2025 18:17
Copy link

github-actions bot commented Jun 13, 2025

Test Results

    19 files      19 suites   3d 9h 45m 8s ⏱️
 2 813 tests  2 813 ✅ 0 💤 0 ❌
51 945 runs  51 945 ✅ 0 💤 0 ❌

Results for commit 5f381b2.

♻️ This comment has been updated with latest results.

If you import `cppyy` before ROOT, you get these warnings by default:

```txt
/home/rembserj/code/root/root_install/lib/root/cppyy_backend/loader.py:147: UserWarning: No precompiled header available (cannot import name 'get_cppversion' from 'cppyy_backend._get_cppflags' (/home/rembserj/code/root/root_install/lib/root/cppyy_backend/_get_cppflags.py)); this may impact performance.
  warnings.warn('No precompiled header available (%s); this may impact performance.' % msg)
/home/rembserj/code/root/root_install/lib/root/cppyy/__init__.py:378: UserWarning: CPyCppyy API not found (tried: /nix/store/8w718rm43x7z73xhw9d6vh8s4snrq67h-python3-3.12.10/include/site/python3.12); set CPPYY_API_PATH envar to the 'CPyCppyy' API directory to fix
  warnings.warn("CPyCppyy API not found (tried: %s); "
```

Doing the import locally, so it happens after `import ROOT`, avoids
these warnings.
@guitargeek guitargeek force-pushed the cmdLineUtils_cppyy branch from 1597da0 to 5f381b2 Compare June 14, 2025 23:25
@guitargeek guitargeek requested a review from aaronj0 June 16, 2025 05:41
Copy link
Contributor

@aaronj0 aaronj0 left a comment

Choose a reason for hiding this comment

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

Thanks!

@guitargeek guitargeek merged commit b7eb820 into root-project:master Jun 16, 2025
23 of 24 checks passed
@guitargeek guitargeek deleted the cmdLineUtils_cppyy branch June 16, 2025 06:10
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.

2 participants