Details
-
Bug
-
Resolution: Duplicate
-
Medium
-
None
-
None
-
None
-
Conda build of ROOT master on 17th July 2020, though probably affects 6.22.
Description
$ python -c 'import cppyy' |
/home/cburr/miniconda3/envs/cern-root-nightly/lib/python3.8/site-packages/cppyy_backend/loader.py:113: UserWarning: No precompiled header available (/home/cburr/miniconda3/envs/cern-root-nightly/lib/python3.8/site-packages/cppyy_backend/etc not writable); this may impact performance. |
warnings.warn('No precompiled header available (%s); this may impact performance.' % msg) |
|
$ python -c 'import ROOT; import cppyy' |
Looks like it's caused by this: https://github.com/root-project/root/blob/9053ef6f4c83d169b8b93ab0b921732bc2c29b78/bindings/pyroot/pythonizations/python/ROOT/__init__.py#L11-L28
Setting CLING_STANDARD_PCH="none" prevents the warning from being printed.
The order of Python imports shouldn't matter and they should be side effect free. It's generally seen as good style to group them as:
1. Standard library imports
2. Third party imports
3. Local library specific imports
with a newline between each. Inside the groups they should be ordered alphabetically which would put cppyy before ROOT.