This message comes from code in the lsstimport module. This module is loaded in every single _init.py file in the lsst hierarchy and so is loaded by every Python process that attempts to import a package as import lsst.xxx. sconsUtils has a version of init_.py that doesn't care if lsstimport can not be imported, which is fine for the very first package that is being built but is irrelevant once base is installed. When scons imports an LSST package lsstimport can be found but lsstcppimport can not be loaded because the library load path environment variables have been stripped. sconsUtils does not care about that because sconsUtils does not need any LSST packages other than sconsUtils to load.
There are a number of options here:
- Disable the print message in lsstimport.
- Try to introspect enough to determine that scons is loading lsstimport and do not warn.
- Move sconsUtils outside the LSST namespace and just call it something like lsstsconsUtils.
The fundamental problem is that Python 2 module namespaces are broken since they always require a _init_.py file in the root namespace.