[Distutils] Missing packages

Phillip J. Eby pje at telecommunity.com
Fri Mar 17 18:00:39 CET 2006

At 04:07 PM 3/17/2006 +0200, Juha Tuomala wrote:
>On Thursday 16 March 2006 21:52, Phillip J. Eby wrote:
> > Yes.  The simplest way to get it is probably to build the Cheetah RPM 
> using
> > setuptools, by getting the source and then running this in the directory
> > with its setup.py:
> >
> >      python -c "import setuptools; execfile('setup.py')" bdist_rpm ...
>These switches are pobably used:
>   --spec-only          only regenerate spec file
>   --source-only        only generate source RPM
>   --binary-only        only generate binary RPM
>I tried --spec-only and the spec file what it generates
>might work, but would never pass to Fedora/Red Hat/Suste distro
>as such.

Okay, then make the spec file do this for the install (instead of "python 
setup.py install --root"):

    python -c "import setuptools; execfile('setup.py')" install --root=... etc.

>In Linux world dependencies are handled with package management
>with RPM and yum/apt like tools. For me it looks that setuptools
>handles same area which is overlapping. I can see it's importance
>in systems like Solaris where its own package tool is so ancient
>what doesn't meet todays needs but in case of RPM or Linux, it
>would be just better to be able to do simple install and let the
>system native tools to handle the rest.

And that's exactly what you'll be able to do when Python 2.5 comes out.

As it happens, you encountered only two actual limitations of the existing 
interface between setuptools and system packaging tools:

1. Namespace packages (which are used by the Paste* projects) and system 
packages don't work together properly yet

2. Not every Python project includes egg-info yet (e.g. Cheetah)

Item #1 is now fixed in Subversion.  Item #2 will be completely fixed when 
Python 2.5 comes out, as all distutils-based packages will install a 
.egg-info file, not just setuptools-based ones.

Until Python 2.5 comes out, however, setuptools-based packages with 
dependencies will require that their dependency packages be repackaged 
using setuptools so that they install the .egg-info.  This should only 
require a 1-line change to the dependency's spec file, as shown above.

Thank you for having the patience to stick with it this long, and for 
providing me with the information I needed in order to fix problem #1.  I 
hope you will find that the latest version of setuptools in Subversion 
makes it possible for you to proceed now.

More information about the Distutils-SIG mailing list