Factor out the build_ext fixup for shared Python builds.

I need this to fix the failing test_install.
2 files changed