Use Linux to build win32 installers for Python apps

A python-based project I'm working on has a win32 user that I need to support. Until yesterday I've been moving to a win32 laptop in order to run python bdist_wininst so I can produce a self-installing executable. Then I discovered how trivial it is to use wine to do the job:

  1. Install wine. (sudo aptitude install wine)
  2. Install python into the wine environment. (Download an msi from and run msiexec /i python-x.x.x.msi.)
  3. Install whatever prerequisite packages you need (e.g. wxPython) using wine or msiexec.
  4. When you've got everything ready to build, just do wine c:/Python27/python.exe bdist_wininst and look in ./dist/ for your exe!
Posted on 2011-07-20 by brian in python .
Comments on this post are closed. If you have something to share, please send me email.