[Distutils] Specify missing install-requires dependencies to develop egg?

Matthew Brett matthew.brett at gmail.com
Fri Aug 26 05:10:04 CEST 2011


On Thu, Aug 25, 2011 at 7:50 PM, Reinout van Rees <reinout at vanrees.org> wrote:
> On 26-08-11 03:06, Matthew Brett wrote:
>> 'nibabel' needs to import numpy to install
> With your latest reply I re-read your original. Hm, this looks like a real
> problem: if your setup.py already imports from numpy (which your statement
> sounds like), numpy really needs to be there already.

Yes, that is what made me think that a new recipe might be the only
way, where the recipe would put numpy on the path during the develop

> The only thing I can think of right now is to have numpy installed globally
> and to use buildout 1.4.4 + osc.recipe.sysegg to depend on numpy. If you
> call the sysegg part right at the beginning, you might get it to work.

Yes, if numpy is already on the path, it works, but we wanted to test
against several different numpy versions, and it seemed ugly and
fragile to make a separate virtualenv for each python / numpy version
pair.  We'd much rather use the buildout mechanism to specify these,
if possible.

> Alternative is to re-work your setup.py. Do you really need to import numpy?

Actually, no, not in this case, it is only used as a crude dependency
check.  But, for other packages we have, we do need numpy.distutils
for the setup.py - for example to find the numpy include directory for
compiling C modules.  The only reason I was offering this package as
an example is that it is rather small and easy to install compared to
the others.

Thanks a lot,


More information about the Distutils-SIG mailing list