Using setuptools as downloader for .msi/.exe

Hello,
how can I use setuptools for downloading (and installing) .msi and .exe on Windows? I need this for extension modules like pygtk, lxml, psycopg2.
Or at least for finding the files within a html page, like easy_install does.
Background: The Tryton ERP system requires quite a lot of dependencies. The installation is an imposition to the user when following the installation instructions at http://code.google.com/p/tryton/wiki/InstallationWindows.
So I want to write an installation script which bootstraps setuptools (this part is already done), installs requires eggs (done) and downloads .msi or .exe where eggs are not available. The later includes GTK+, Postgresql and some extension modules like pygtk.
A normal Windows installer packages is not what I need here. The script is indented for a) developers who want to set up their own development environment and b) users who need to write extensions for their installation.
Since the filenames may vary by version and python-version, (e.g. pygtk-2.12.1-1.win32-py2.5.exe) I do not want to hard-code these. Esp. since this would require changing the script quite often. easy_install already has a feature for finding the best-matching version

At 10:36 AM 6/12/2009 +0200, Hartmut Goebel wrote:
Hello,
how can I use setuptools for downloading (and installing) .msi and .exe on Windows? I need this for extension modules like pygtk, lxml, psycopg2.
Or at least for finding the files within a html page, like easy_install does.
See the setuptools.package_index module. You probably want to subclass PackageIndex, and use your own versions of the distros_for_location() or interpret_distro_name() functions.

P.J. Eby schrieb:
See the setuptools.package_index module. You probably want to subclass PackageIndex, and use your own versions of the distros_for_location() or interpret_distro_name() functions.
Thanks for the tips.
The task requires monkey-patching a "decorated" distros_for_location, a new version of parse_bdist_winexe (not monkey-patched) and a new function parse_bdist_winexe.
I decided against subclassing PackageIndex, since this would require much more code duplication. (Some of the required methods are quite large and call distros_for_location at the and anyway.)
For the records I'll post the download link here, as soon as the modules is published.
participants (2)
-
Hartmut Goebel
-
P.J. Eby