[core] Fix PyPI install by shifting imports around

If you look up "horrible ugly hack" in the dictionary, it says see also
and then the hash of this commit.