Skip to content

Dependencies during installation #769

ronaldoussoren opened this Issue Jan 16, 2013 · 6 comments

7 participants


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.

hookdump commented Aug 2, 2013

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.

@dstufft dstufft modified the milestone: 6.0 Dec 18, 2014
pushrax commented Mar 23, 2015

Is there anything blocking this or is it just a matter of doing it?

Python Packaging Authority member
Ivoz commented Mar 23, 2015

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

@jcmcken jcmcken referenced this issue in django-guardian/django-guardian May 6, 2016

Incompatible setup_requires setting in #425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.