[Distutils] "setup.py needs to go away" (was [PEP 376] - Open questions on python-dev)

Tres Seaver tseaver at palladion.com
Sun Jul 12 14:34:20 CEST 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Fulton wrote:
> On Jul 12, 2009, at 6:24 AM, David Cournapeau wrote:
>> I know about virtualenv, pip, yolk (much less about buildout). I even
>> use them sometimes (I never use setuptools outside a virtualenv, for
>> example). But I don't see how this solve the deployment problem. How  
>> is virtualenv useful for distribution of software to end users ?
> 
> Well, I'm more familiar with buildout. :) Buildout makes it  
> straightforward to control precisely the packages in your  
> application.  A tool named zc.sourcerelease, let's you build a release  
> that contains a particular configuration of packages with an install  
> script that installs them.  (This isn't limited to Python packages  
> either.  It can include 3rd-party applications such as libraries,  
> database servers, etc. -- anything that's installed with a configure- 
> make-make-install dance.)  This source release then becomes the basis  
> for an installer.  We use it to create RPMs for our applications.   
> Because we use RPM, our applications can share a common "clean" Python  
> RPM that has what you'd get from a source install of Python.  We don't  
> include Python in the application RPMs, although it would be pretty  
> easy to do so.
> 
> I think something like this is possible with pip/virtualenv.  I could  
> be wrong.

virtualenv doesn't focus on the repeatability part:  it just gets you an
isolated Python environment where you can install packages without
affecting other users of Python on your system, and (as an option) where
you can be unaffected by packages installed to the "base" Python's
site-packages.

I often create muliple virtualenvs in a single day, just so that I can
test that packages install cleanly, have their dependencies specified
correctly etc., and then just throw them away.

WRT David's question about using virtualenv for distribution:  it has a
feature which allows you to generate a clone of the virtualenv.py
script, adding additional post-creation steps, such as installing
packages.  We use this feature to build tutorial DVDs, so that people
can install an application using the pacakges in the index on the DVD,
without requiring network connectivity:  all they need is to run the
script with an already-installed Python, and point at the target directory.


Tres.
- --
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFKWdhL+gerLs4ltQ4RAs9lAJ9nE62nWJebEJVPkEVXXhRDJ2Ud8gCfQSxg
L2Q7q3TPY3NhkPpioIU8i0g=
=s9Qv
-----END PGP SIGNATURE-----



More information about the Distutils-SIG mailing list