Factor out the build_ext fixup for shared Python builds.

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