Merge lp:~allenap/maas/effing-download-cache into lp:maas/trunk

Proposed by Gavin Panella on 2012-06-15
Status: Merged
Approved by: Gavin Panella on 2012-06-15
Approved revision: 647
Merged at revision: 651
Proposed branch: lp:~allenap/maas/effing-download-cache
Merge into: lp:maas/trunk
Diff against target: 0 lines
To merge this branch: bzr merge lp:~allenap/maas/effing-download-cache
Reviewer Review Type Date Requested Status
Raphaël Badin (community) 2012-06-15 Approve on 2012-06-15
Review via email: mp+110534@code.launchpad.net

Commit Message

Remove need for faulty bootstrap.py by install zc.buildout into a virtualenv.

Description of the Change

This removes the need for the faulty zc.buildout bootstrap.py script. Instead it creates a virtualenv and uses pip to install zc.buildout from source.

Part of this required removing the allowed-eggs-from-site-packages setting in buildout.cfg. This isn't really needed - I think we always want to use the system package if it's available - and I believe this option won't be available in buildout 2. If we need to test using a package version different to the system package it can be installed using pip.

To post a comment you must log in.
Raphaël Badin (rvb) wrote :

I can't say I'm an expert on this but I think this looks good.

We would clearly be better off if we could get rid of buildout (but is there a decent alternative? pip+virtualenv?). This seems like a first step.

[0]

33 + $ sudo apt-get install python-sphinx python-lxml python-pocket-lint \
34 + python-pip python-virtualenv

70 + bin/pip --quiet install bootstrap/zc.buildout-1.5.2.tar.gz

Would it be possible to add 'python-zc.buildout' to the list of required packages and install it from the system's package rather that from a file in our tree?

[1]

44 +buildout := bin/buildout $(shell tty -s && echo -D)

Can you explain why this is needed?

review: Approve
646. By Gavin Panella on 2012-06-15

Force install zc.buildout from source, so that we can be sure to get the bin/buildout script.

647. By Gavin Panella on 2012-06-15

Don't automatically open the post-mortem debugger when buildout goes wrong.

Gavin Panella (allenap) wrote :

> [0]
>
> 33 + $ sudo apt-get install python-sphinx python-lxml python-pocket-
> lint \
> 34 + python-pip python-virtualenv
>
> 70 + bin/pip --quiet install bootstrap/zc.buildout-1.5.2.tar.gz
>
> Would it be possible to add 'python-zc.buildout' to the list of required
> packages and install it from the system's package rather that from a file in
> our tree?

It doesn't quite work. We currently rely on the bin/buildout script.
We need to force the installation (change just pushed) so that this
script is created. In any case, zc.buildout-1.5.2.tar.gz is only
324kB, and we'll get rid of it soon I hope :)

>
> [1]
>
> 44 +buildout := bin/buildout $(shell tty -s && echo -D)
>
> Can you explain why this is needed?

This is something I left it from testing. It just enabled post-mortem
debugging if it's invoked from an interactive terminal.

Thanks for the review!

Preview Diff

Empty