[Python-Dev] Packaging and binary distributions

Vinay Sajip vinay_sajip at yahoo.co.uk
Mon Oct 31 12:40:07 CET 2011


Martin v. Löwis <martin <at> v.loewis.de> writes:


> This presumption is false (as is the claim that you need to install the
> MSI to get at the files). It's quite possible to extract the files from
> the MSI without performing the installation. There are actually two ways
> to do that:
> a) perform an "administrative" installation, which unpacks the files to
>    disk but doesn't actually perform any installation procedure, or
> b) use the MSI API to extract first the CAB file, and then the files in
>    the CAB file. This would be a bit work to do if you want to find out
>    the full path names of the individual files, but it could work in
>    theory.

I'd completely forgotten about the administrative installation - thanks for
reminding me.

> The MSI format is designed to provide exactly that flexibility of
> arbitrarily mapping source folders to destination folders during
> installation. bdist_msi would just need to be taught to interpret
> setup.cfg files.

I agree in principle, but one thing you get with setup.cfg which seems harder to
achieve with MSI is the use of Python to do things at installation time. For
example, with setup.cfg hooks, you can use ctypes to make Windows API calls at
installation time to decide where to put things. While this same flexibility
exists in the MSI format (with custom actions and so forth) it's not as readily
accessible to someone who wants to use Python to code this type of installation
logic.

> 
> Hmm. You are just describing a bug, not an inherent limitation.
> 

You're right that it's not an inherent limitation, but I'm not sure which bug
you're referring to. Do you mean just a current limitation?

Regards,

Vinay Sajip




More information about the Python-Dev mailing list