[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 20:26:31 CEST 2008

All my development is done on Linux.  I use Windows very minimally (such
as for tax preparation) and unless forced to do so for specific
circumstances (such as submittal to grants.gov) do not expose Windows to
the Internet.

In the future there may possibly arise a need for us to port some
Linux-developed Python code to Windows, but we will have to cross that
bridge when we get there.

I think you raise an interesting issue:  What is a package manager?  I
have minimal experience installing packages on Windows over the last 5-10
years, but in my experience a Windows package comes as an executable that,
when run, installs itself.  Unless a third-party program monitors the
installation, uninstalling is a nasty chore, as is finding out what files
were installed or where they went.

The rpm and deb package managers (and their yum and other higher level
dependency managers) do a lot of things:

1.  They install packages and maintain databases of what packages were
2.  They manage dependencies
3.  They support clean uninstalling of packages
4.  They can query packages, both installed (via their databases) and not
yet installed (e.g., as rpm or deb files), to determine attributes, such
as files they install, dependencies, and other information defined at
packaging time.
5.  They build packages and (in some cases) can rebuild packages.
6.  They can verify packages for integrity and security purposes.
7.  They can download package files and maintain archives of installed
package files for use as local repositories.

There may be other functions, but the above is a top-of-the-head list.

I can say that I'm not terribly happy with Python packaging that is only
minimally compatible with rpm.  I haven't used Ubuntu all that much. I do
like Ubuntu's packaging and package management, and I do know that there
are  programs, such as alias, that can translate from rpm to deb formats.

I don't think I ever said that Windows is broken in the area of package
management.  My own experience is that the files of Windows programs tend
to be put in a directory devoted to the program, rather than put in
directories with other files having similar purposes.  At one time, the
default location in Windows for word processing files was even in a
sub-directory of the word processing program.  That changed to having a
form of user home directory, but it didn't change much for the program
files themselves.  Unix/Linux puts the files in specific areas of the file
system having functional commonality.  One could almost say that the
Windows default approach to structuring its filesystem avoids or minimizes
the need for package management.

I repeat that this issue mainly arises because Windows doesn't have the
same kind of filesystem structure (and therefore the need for package
management) that other systems have.  I don't know what Windows add/remove
programs function does, but all it might do is to run the executable to
install packages and record the installation (as was previously done by
third party programs) to facilitate clean removal.  Unless you can perform
more of the other functions I listed above, I doubt I would call
add/remove a package manager.

Stan Klein

On Wed, April 9, 2008 1:23 pm, Paul Moore wrote:
> On 09/04/2008, Stanley A. Klein <sklein at cpcug.org> wrote:
>> IMHO, the main system without a package manager is Windows.  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.  The
>> package
>>  manager could establish a file hierarchy similar to the Unix FHS and
>>  install files appropriately, except for what is needed to satisfy the
>>  Windows OS.  That would probably go a long way to addressing the issues
>>  being discussed here.  This is primarily a Windows problem, not a
>> Python
>>  problem.
> Windows does have a package manager - the add/remove programs
> application. It's extremely limited, and doesn't make any attempt at
> doing dependency resolution, certainly - but that's a separate issue.
> I don't know if you use Windows (as in, develop programs using Python
> on Windows). If you do, then I'd be interested in your views on
> bdist_wininst and bdist_msi installers, and how they fit into the
> setuptools/egg environment, particularly with regard to the package
> manager you are proposing. If you don't use Windows, then I don't see
> how you can usefully comment.
> Personally, as I've said before, I don't have a problem with a
> Python-only package manager, as long as it replaces or integrates
> bdist_wininst and bdist_msi. Having two package managers is far worse
> than having none - and claiming that add/remove programs "isn't a
> package manager" is just ignoring reality (if it isn't, then why do
> bdist_wininst and bdist_msi exist?).
> Are the Linux users happy with having a Python package manager that
> ignores RPM/apt? Why should Windows users be any happier?
> Sorry - I'm feeling a little grumpy. I've read one too many "Windows
> is so broken that people who use it obviously don't care about doing
> things right" postings this week :-(
> Paul.


More information about the Python-Dev mailing list