buildout and build-time dependencies
![](https://secure.gravatar.com/avatar/1b53df68289c2437ed6ab4ebec215d48.jpg?s=120&d=mm&r=g)
Hey folks, <butt_covering> 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. </butt_covering> 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: [numpy] 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: [pyscripts] recipe = zc.recipe.egg:scripts dependent-scripts = true eggs = numpy scipy networkx pydicom traits wsgiref nibabel nipype 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, Ben
![](https://secure.gravatar.com/avatar/d8199ddc0a286ca23415595a4eb22c44.jpg?s=120&d=mm&r=g)
On 28-02-13 20:31, Ben Acland wrote:
tl;dr: how to handle build time dependencies between python modules using buildout, without looking stupid or including .tar.gz files in my repo.
numpy and scipy are a hell to install. I basically install them in the OS and use the "syseggrecipe" to get the globally-installed ones in my buildout: https://pypi.python.org/pypi/syseggrecipe Alternatively, for all your "compile/make/make install" fun there's https://pypi.python.org/pypi/zc.recipe.cmmi Problem, it isn't "compile/make/make install" but a "setup.py install". Well, you mention that including the .tgz is a problem. You *can* download it with a download recipe: https://pypi.python.org/pypi/gocept.download/0.9.5 And another alternative is to create a custom build recipe like exists for lxml: https://pypi.python.org/pypi/z3c.recipe.staticlxml/ I guess that the syseggrecipe is the handiest at the moment. Reinout -- Reinout van Rees http://reinout.vanrees.org/ reinout@vanrees.org http://www.nelen-schuurmans.nl/ "If you're not sure what to do, make something. -- Paul Graham"
![](https://secure.gravatar.com/avatar/b3bdff73fe23760b072bae07837161ba.jpg?s=120&d=mm&r=g)
On Mar 1, 2013 5:54 AM, "Reinout van Rees" <reinout@vanrees.org> wrote:
On 28-02-13 20:31, Ben Acland wrote:
tl;dr: how to handle build time dependencies between python modules using buildout, without looking stupid or including .tar.gz files in my repo.
numpy and scipy are a hell to install.
Would there be something we could do to help these important projects be easier to install? -- Philippe
participants (3)
-
Ben Acland
-
Philippe Ombredanne
-
Reinout van Rees