TITLE OF PAPER: Python Packaging with Microsoft Installer URL OF PRESENTATION: _URL_of_powerpoint_presentation_ PRESENTED BY: Martin V. Loevis REPRESENTING: _author_affiliation_here_ CONFERENCE: PyCON 2004 DATE: 20040324 LOCATION: _venue_and_room_in_venue_ -------------------------------------------------------------------------- REAL-TIME NOTES / ANNOTATIONS OF THE PAPER: {If you've contributed, add your name, e-mail & URL at the bottom} in windows you cannot expect to find compilers or even zip/unzip abilities so the windows traditions is to pass a self-extracting install Python is packaged using the Wyse Installer Issues with Wyse - it's a commercial product and licenses are not really available Support for recent development lacking: no support for win64 no support for VS .net (no inclusion of msvcr71.dll) limited support for unattended install - if you do choose unattended install there is not a way to customize things like target folder and other options no easy way of deployment in a windows domain - deployment using group policies requires unattended install so it is problematic under wise Microsoft Installer different approache to installing program logic already part of the operating system (msiexec.exe); packages are not self-extra package is a SQL database + OLE streams relational tables describe set of directories/files, user interface, registry changes, etc included in Win2k sp3, WinXP, Win2k3 redistributable for Win9x often already available as a side-effect of installing other software Installer Features Installation, De-Installation, Repair Installation Per-machine vs. per-user installation Administrative Installation: customize for network installation Advertising: Add entries to Start menu, file assocations w/o actual installation access to menu item will trigger installation parametrization of package through properties Upgrade installtion package code product code, upgrade code allow to remove/replace earlier versions Installation on all computers of domain through group policy Q: can you do both, can you chose between replace/upgrade and install side-by-side A: that is up to the package offer - if you reuse the same product it will always do an upgrade, if you use a different code it will let you select Creation of Installer Packages Creation through 3rd party tools VS.net, Wise, InstallShield again proprietary tools again limited features (e.g. missing win64 support) Creation through Microsoft API C library (MSI.h, MSI.lib) COM interface (WiondowsInstaller.Installer) Python MSI library two code modules msilib.py python wrapper around COM msi.py python program to package python support modules: schema.py uisample.py MSI Example: files Schema Example: Files installer api does not have a way of creating an empty database so he created a python script to generate an empty set of tables to start with Example: Packaging Files files are stored in a CAB file, referenced in the File table Status and Future Work Packageing library currently in a sandbox/msi Library could be extended for other packaging projects as well support for lacking features should then be added distutils could grow a bdist_msi package MSI library must be incorporated into standard library: still require win32.com? alternatively user interface needed Q: are you looking into using Py2exe A: I'm not quite sure how that will help - Py2exe is good at creating single... after qualification example he said yes Q: are you considering including with 2.3 A: currently it's in a sandbox, but yes he is considering it Q: are you considering using it to package other apps A: not really because the UI description is really tedious - would require the creation of a UI editor Q: have you used custom action - like compiling pyc files at the end of the install? A: the custom action is also described in the relational table - you have a set of pre-configured actions (copy file, update registry) but sometiems you want to execute additional code during the install and that would require you to add a custom action written in vbscript or javascript. Q: example of a custom action you have written? A: to check to see if the target directory already exists and pop up a dialog to confirm note from audience: ActivePython uses MSI to install, they use py2exe to build a custom .exe and then insert that as a custom action Q: will this new installer replace the wise installer in 2.4? A: yes if things go as he desires Q: why not use one of the already existing open source installers A: his answer was the lack of Win64 but an audience member pointed out the need to have .msi support in the network admin world -------------------------------------------------------------------------- REFERENCES: {as documents / sites are referenced add them below} PAPER: http://www.python.org/pycon/dc2004/papers/44/msipackage.html -------------------------------------------------------------------------- QUOTES: -------------------------------------------------------------------------- CONTRIBUTORS: {add your name, e-mail address and URL below} Mike Taylor, bear@code-bear.com Ted Leung, twl@osafoundation.org, http://www.sauria.com/blog Bob Kuehne, rpk@blue-newt.com, http://www.blue-newt.com -------------------------------------------------------------------------- E-MAIL BOUNCEBACK: {add your e-mail address separated by commas } -------------------------------------------------------------------------- NOTES ON / KEY TO THIS TEMPLATE: A headline (like a field in a database) will be CAPITALISED This differentiates from the text that follows A variable that you can change will be surrounded by _underscores_ Spaces in variables are also replaced with under_scores This allows people to select the whole variable with a simple double-click A tool-tip is lower case and surrounded by {curly brackets / parentheses} These supply helpful contextual information. -------------------------------------------------------------------------- Copyright shared between all the participants unless otherwise stated...