The primary usecase for this issue is PyObjC, not sure if other packages will run into this.
PyObjC has a umbrella package "pyobjc" that is only used for installation and depends on the actual packages, "pyobjc-core", "pyobjc-framework-...".
The pyobjc-framework-... packages all have a setup_requires for pyobjc-core because they use a header file from pyobjc-core's egg-info when compiling extensions.
When I install PyObjC using "pip install pyobjc" the "pyobjc-core" package gets build multiple times. The reason for this appears to be that pip first installs all packages into a temporary location that is not on sys.path and then moves it to the right location.
Would it be possible to add the temporary location to sys.path while installing/building the dependencies? That would avoid a lot of compile-time overhead for me.
A bit late, but I'd like to leave a tip:
pip install -U pyobjc-core
pip install -U pyobjc
This should prevent the crazy repeated compilations.
I know, and that's what I've documented in PyObjC's documentation. It should be possible to avoid the recompilations without using this workaround, although I haven't looked at pip's sources yet to see how hard this would be.
Is there anything blocking this or is it just a matter of doing it?
Probably a matter of implementing a build-time-dependency cache, and also working out whether pip and & setuptools need to or should be cooperating in implementing that functionality. Otherwise, just a matter of doing it
FYI, I've restructured PyObjC's packages to avoid this problem. This is not yet in the current release, but will be in a future release.
currently pip is not hooking into build time dependencies (i.e. setup_requires)
there are peps for preparing that and its going to take a while before this is properly doable