[Distutils] Towards a bandersnatch release - updates, PIP, contacting mirror owners

Carl Meyer carl at oddbird.net
Mon Apr 8 20:07:50 CEST 2013


Hello Christian,

On 04/08/2013 09:09 AM, Christian Theune wrote:
> As I have not used pip seriously before, I'm wondering how people
> document service setups for pip users that are repeatable, i.e. where
> all dependency versions will be fixed.
> 
> I think the verdict on fixing versions in setup.py was passed a few
> years ago (correctly), so I think pip uses requirements.txt files for this.
> 
> How do you guide pip users to install a service (not a library) this way?
> 
> AFAICT a changed installation instruction would look like this:
> 
> $ virtualenv-2.7 bandersnatch
> $ cd bandersnatch
> $ wget http://someserver/bandersnatch-1.0/requirements.txt
> $ bin/pip install -r requirements.txt
>
> This doesn't look too different from my current approach, except that
> you download a (versioned) requirements.txt file instead of getting a
> checkout. Whether you run
> 
> $ bin/python bootstrap.py; bin/buildout
> 
> or
> 
> $ bin/pip install -r requirements.txt
> 
> Doesn't make too much of a difference to me. In contrast: running from
> an HG clone gives easier ugprades, actually.
> 
> Again, I'm trying to understand why people want to do it this way and
> I'm happy to do some extra work in order to learn something.
> 
> What am I missing?

I don't think you're really missing anything, except that for some
people pip is familiar and comfortable and buildout is not. And these
people may want to manage their deployment using existing infrastructure
(e.g. Chef/Puppet recipes) that relies on having a requirements.txt
file, making the two options not so equivalent as they seem to you. For
instance, if someone wanted to deploy bandersnatch to the Heroku
platform-as-a-service without writing a custom build-pack, they would
not even be running either of the commands above themselves, they would
need to provide a requirements.txt file to Heroku.

I don't think this would need to be a particularly complex change on
your part; just upload the sdist, provide a requirements.txt file with
exactly-pinned dependencies for each bandersnatch version, and note its
existence as a second option in your installation instructions.

Carl


More information about the Distutils-SIG mailing list