[Distutils] buildout and build-time dependencies

Ben Acland benacland at gmail.com
Thu Feb 28 20:31:08 CET 2013

Hey folks,

I've googled around, hit IRC, and tried a bunch of stuff to fix this. Even so, maybe I missed something obvious. Sorry if this question is redundant.

I'm using buildout to install a series of python modules, each of which is dependent on the others *at build time.* For example, numpy, then scipy. If I try to build scipy without numpy around, the scipy build fails complaining about not being able to find "numpy.distutils...". I can include the full text of the error here, but get the feeling that you either know what I'm talking about or not by this point.

There doesn't seem to be a way to do this cleanly using buildout. Instead, I have had to put .tar.gz versions of each of the libraries in my repo along with bootstrap.py, and am installing them using a step like this:

recipe = collective.recipe.cmd
cmds = 
	mkdir tmp_numpy
  	cd tmp_numpy
  	tar -xzvf ${buildout:packages}/numpy-1.7.0.tar.gz
  	${buildout:directory}/bin/buildout setup numpy-1.7.0 install
  	cd ../
  	rm -rf tmp_numpy
on_install = true
on_update = true

... obviously, this won't fly if I don't have sudo access, so I'm having to run buildout inside of a virtualenv. Blah blah blah, I can go into the gory details if you want, but the bottom line things that I dislike about this are:

1) I have to include the packages in the repo.
2) I'm going to have to teach my labmates how to use virtualenv AND buildout.
3) After I install them this way, I have to install them again as follows in order to get a linked interpreter:

recipe = zc.recipe.egg:scripts
dependent-scripts = true
eggs = numpy

SO. Please, tell me that I'm stupid and that I've missed something obvious.

tl;dr: how to handle build time dependencies between python modules using buildout, without looking stupid or including .tar.gz files in my repo.

Thanks for your time and good work,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130228/f6d19994/attachment.html>

More information about the Distutils-SIG mailing list