Make a Windows installer for your python module

To help you build and distribute your Python packges, Python provides distutils. This library knows how to bring together your modules, where to put scripts and how to compile C extensions. The process is driven by a file, written by the package author or maintainer. Depending on what argument is passed, can install the package, build an archive or build an installer. To create a Windows installer for a module called proceeed as follows. Create a file in the same directory as your existing module(s), describing what is to be installed:

from distutils.core import setup
      description='A utility to deal with underpants and pencils.',
      author='Fred Bloggs',
      py_modules=['wibble'], # Add more modules as desired

Run the following command:

python bdist_wininst

This will generate wibble-1.0.win32.exe, which can install Wibble on any Windows PC already having a version of Python. As a bonus the bdist_wininst command doesn’t itself require Windows, so you can create the installer on Linux or Mac OS.