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

Matthew Brett matthew.brett at gmail.com
Fri Aug 26 03:06:48 CEST 2011


We have been working on using buildout with a develop package
depending on numpy, and ran into trouble because 'numpy' is not
specified in the package 'install_requires'.

Specifically, we have something like this:

parts =

recipe = zc.recipe.egg:develop
setup = src/nibabel

recipe = zc.recipe.egg:script
eggs =
interpreter = py

'nibabel' needs to import numpy to install, but does not specify
'numpy' in its setup.py install_requires, because pip install of numpy
is fragile, and we wanted to error early in general for an attempted
pip install of nibabel, if numpy was not present.

But of course the script above raises an error for the
'nibabel-target' part, because of missing numpy:

RuntimeError: Cannot import package "numpy" - is it installed?
  Installing nibabel-target.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:

What we would very much like to do, is to be able to specify the
missing install_requires for this package (and for others we are
thinking of working with), in the recipe - something like:

recipe = zc.recipe.egg:develop
setup = src/nibabel
install-requires =

but we couldn't immediately see a way of specifying such a dependency.
  A quick look at the Develop code in zc/recipe/egg/custom.py
suggested that there wasn't an easy way to add some needed egg onto
the path at this point.

Is there anything we missed that we should have tried?

If not, what would be the best way to solve our problem?  A modified recipe?



More information about the Distutils-SIG mailing list