[Distutils] [ANN] setuptools post install script for bdist_wininst
Manlio Perillo
manlio.perillo at gmail.com
Sun Sep 12 14:36:27 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Il 11/09/2010 23:22, P.J. Eby ha scritto:
> At 09:48 PM 9/11/2010 +0200, Manlio Perillo wrote:
>> Is it possible to put required DLLs inside an egg?
>
> Yes, but they have to be adjacent to any Python extensions (.pyd's) that
> use them.
>
Good to know, thanks.
But how can I create such a egg?
And if this is possible, what do you think is the reasons why packages
like pyqt do not release such eggs?
>> > 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.
>
> But the dependencies installed by easy_install will not get
> corresponding uninstall entries in the Windows control panel, and so
> will not be uninstalled when the user uninstalls the main application or
> library.
>
Ah, right; I was thinking to created shortcuts.
It should not be hard to track installed dependencies, as an example
using the --record option of easy_install, and then registering all
installed files (and directories) with `file_created` and
`directory_created` functions.
The only problem is that created directories are not reported in the
record, but if files are always listed ordered, it should not be a problem.
Some other related questions:
* Do you think you can change ez_setup.py so that the code used to
check if setuptools must be installed is available as a separate
function?
I need to check if setuptools must be installed so that I can pop a
message box.
For normal package dependencies (and assuming setuptools is
available) I can just use working_set.__contains__(dist)
* Is it safe to call `ez_setup.use_setuptools` setting `to_dir`
parameter to `sysconfig.get_python_lib()`?
By default the setuptools egg is copied to the same directory where
the bdist_wininst file is, and this is not safe since the user may
delete these files.
* Is it possible to get the ID of the main window of the bdist_wininst
application?
I need it because MessageBox function requires the ID of the parent
window.
It is possible to use the Desktop as parent, but this may cause
problems (message box displayed in the wrong position, with incorrect
focus, or who know)
* Is it possible to modify bdist_wininst (in a future release) so that,
when executing the post install script, the name of the project being
installed is passed in argv[2]?
This change does not break existing code.
Thanks Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkyMyUsACgkQscQJ24LbaUTAKACfQJDRgrPqkTo+IhTXTZ/zQyop
7Z0AniXpSCvyGpADk87Ybmu1RT0noBO1
=kSwm
-----END PGP SIGNATURE-----
More information about the Distutils-SIG
mailing list