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

Stanley A. Klein sklein at cpcug.org
Wed Apr 9 22:43:32 CEST 2008

On Wed, April 9, 2008 3:40 pm, Phillip J. Eby wrote:
> 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.)

I don't understand what you mean by "shared environments and development
 environments".  I also don't know much about Mac OS, except that its
underlying Darwin system is a version of BSD (that I assume would follow
the Unix FHS).

>>   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.  :)

I have enough trouble with what I'm already doing.  :-)

> 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.

I agree that we are dealing with a combination of technical and social
issues here.  However, I think it takes a lot more understanding for a
publisher to get everything straight.

>> > 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.

But rpms and debs do include these files, plus manual pages, localization
files and a lot of other ancillary stuff.

IIRC, you once mentioned that you have a CENTOS system.  Do an "rpm -qa
|sort|less" to get an alphabetized list of your installed packages, and
then an "rpm -qil" on some of the packages, and you will see the range of
different kinds of files in there.

>>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.

Most of the Python tarballs I have downloaded have all kinds of files in
their installation trees.  This is a major pain in the you-know-what for
someone trying to use bdist_rpm and get proper, FHS-compliant rpms.  If
eggs are supposed to be strictly runtime files, I think very few
developers actually understand that.  Better yet, how do you define what
should be included in an installation?  It sounds like the egg concept
doesn't include several kinds of files that rpm and deb would include in
an installation.  I think that may be an important issue here.

Stan Klein

More information about the Python-Dev mailing list