[Distutils] [ANN] setuptools post install script for bdist_wininst

Manlio Perillo manlio.perillo at gmail.com
Sat Sep 11 21:48:57 CEST 2010

Hash: SHA1

Il 11/09/2010 20:10, P.J. Eby ha scritto:
> At 04:42 PM 9/11/2010 +0200, Manlio Perillo wrote:
>> This is a problem with the installer, since stdout and stderr are fully
>> buffered.
> You probably need to pop up some sort of dialog and direct stdout/stderr
> there. 

Not easy, but I will give it a try.

> Alternately, you could run easy_install in a separate process as
> a console script.
>> ====
>> In case a dependency have extension code that must compiled, in 99% of
>> the cases the post install script will fail, since the compiler or some
>> library is not available.
>> This should not happen; the post install script should, instead, check
>> if in the package download_url there is a bdist_wininst executable,
>> download it and execute it.
> easy_install already does this, sort of: it downloads bdist_wininst
> executables and converts them into eggs, then installs the eggs.

Sorry, I was referring to "all in one" installers, that is, installers
that also install external shared libraries.

As an example:

The PyQt4 installer put external DLLs (and some executables like
designer.exe) in

Is it possible to put required DLLs inside an egg?
For PyQt4 there seems to be only the "all in one" installers and source

I'm also having some issues with PyQt4 and easy_install.

>> Suggestions are welcome.
> In general, I'm not sure that this sort of thing is wise to do in a
> bdist_wininst postinstall without some kind of user prompting, since:
> 1. A primary reason people have for using bdist_wininst installers is
> uninstall support, and this approach will leave dependencies behind.

As far as I know, all dependencies are correctly handled.
Shortcuts are correctly removed by the uninstall.

> 2. Another big reason people have for using these installers instead of
> easy_install is that they don't want things being downloaded from the
> net, because e.g. they have no access or are behind a proxy, so this is
> just going to annoy them.

For me the main reason is the problem users have at using the command
prompt and setting environment variables.
easy_install is perfectly fine, IMHO, it only needs an usable GUI for

I recently discovered that ActivePython have PyPM.
I will do some tests.

> I would strongly recommend having some sort of dialog that simply tells
> the user what dependencies are missing, and then asks if they would like
> to have them installed automatically.  (So the user can then say no if
> they need uninstallability or have limited network access.)

Thanks for the suggestion.

By the way, I tried to install pywin32, but I got:

C:\>easy_install pywin32
Searching for pywin32
Reading http://pypi.python.org/simple/pywin32/
Reading http://sf.net/projects/pywin32
Reading http://sourceforge.net/project/showfiles.php?group_id=78018
Best match: pywin32 214
Processing download
error: Couldn't find a setup script in

It is also strange that path components are also reported using short

Thanks   Manlio
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/


More information about the Distutils-SIG mailing list