Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Example of how to use msilib to create a .msi file from a python module

Can anyone give me an example of how to use python's msilib standard library module to create a msi file from a custom python module?

For example, let's say I have a custom module called cool.py with the following code

class Cool(object):
    def print_cool(self):
        print "cool"

and I want to create an msi file using msilib that will install cool.py in python's site-packages directory.

How can I do that?

like image 282
Paul D. Eden Avatar asked Dec 05 '25 15:12

Paul D. Eden


1 Answers

You need to write a distutils setup script for your module, then you can do

python setup.py bdist_msi

and an msi-installer will be created for your module.

See also http://docs.python.org/distutils/apiref.html#module-distutils.command.bdist_msi

like image 149
theller Avatar answered Dec 08 '25 04:12

theller