[Python-Dev] [Distutils] how to easily consume just the parts of eggs that are good for you

Phillip J. Eby pje at telecommunity.com
Wed Apr 9 21:40:53 CEST 2008

At 11:52 AM 4/9/2008 -0400, Stanley A. Klein wrote:
>However, are you implying that the installation information for Python egg
>packages accesses and coordinates with the rpm database?

Yes, when the information isn't stripped out.  Try a more recent Fedora.

>IMHO, the main system without a package manager is Windows.

You're ignoring shared environments and development 
environments.  (Not to mention Mac OS.)

>   A reasonable
>way to deal with Windows would be to create a package manager for it that
>could be used by Python and anyone else who wanted to use it.

Let us know when you've finished it, along with the one for Mac OS.  :)

Of course this still won't do anything for shared environments and 
development environments.

>You are talking here about bdist_rpm and not about a tool that would take
>a Python package distributed as an egg file and convert the egg to an rpm
>or a deb.  Unfortunately, some Python packagers are beginning to limit
>their focus only to egg distribution.  That creates a problem for users
>who have native operating system package management.

That is indeed a problem -- but it's a social one, not a technical 
one.  It's trivial for the publisher of an egg to change their 
command line from "setup.py bdist_egg upload" to "setup.py sdist 
bdist_egg upload", as soon as their users (politely) request that they do so.

> > Applying LSB and FHS to the innards of Python packages makes as much
> > sense as applying them to the contents of Java .jar files -- i.e.,
> > none.  If it's unchanging data that's part of a program or library,
> > then it's a program or library, just like static data declared in a C
> > program or library.  Whether the file extension is .py, .so, or even
> > .png is irrelevant.
>The FHS defines places to put specific kinds of files, such as command
>scripts (/bin, /usr/bin, /sbin, or /usr/sbin), documentation
>(/usr/share/doc/package-name), and configuration files (/etc).  There are
>several kinds of files identified and places defined to put them.
>Distribution by eggs has a tendency to scoop up all of those files and put
>them in /usr/lib/python/site-packages, regardless of where they belong.

Eggs don't include documentation or configuration files, and they 
install scripts in script directories, so I don't get what you're 
talking about here.  For any other data that a package accesses at 
runtime, my earlier comments apply.

>Having eggs support conformance to FHS would mean recognizing and tagging
>the relevant files.  A tool for converting eggs to rpms or debs would
>essentially reformat the egg to rpm or deb and put files where they

No, because such files as you describe don't exist.  If you think 
they do, then either you have misunderstood the nature of the files 
in question, or the developer has incorrectly placed non-runtime 
files in their installation tree.

More information about the Python-Dev mailing list