Distributing Packages

Chris Withers chris at simplistix.co.uk
Fri Sep 24 11:27:18 CEST 2010

On 23/09/2010 16:41, Greg Lindstrom wrote:
> I am not intending to start anything, here, but would like to know if
> any consensus has been reached in how to distribute Python modules.

Hi Greg,

The following shows a pattern that's working well for me:


The "work" is in setup.py.

The development docs are here:


Ignore the sphinx and buildout stuff if you're not using them, although 
I find both extremely valuable...

> Specifically, I'd like to use something to install packages on various
> machines in our enterprise (mostly Linux, but some windows boxes, too).

With the above, I'd do:

python setup.py sdist

...and then put the resulting sdist in a folder served by Apache.

To install on a given box, I'd then do:

easy_install --find-links=http://yourserver/your/folder yourpackage

Using setuptools for the setup.py means you can specify any other 
packages your need via the install_requires parameter .

I'd suggestion buildout or virtualenv for deploying to the servers too, 
installing into the system python's site-packages is yucky and means all 
projects on one box have to use the same versions of the same libraries...



Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk

More information about the Python-list mailing list