Reputation: 1507
I have a Python program that runs in Linux.
My customers may want to run the Python program on Windows.
Assume that they do not want to install Python, PyGTK, or Linux.
Is there a tool, preferably free ("open-source") software, that can run in Linux, take my Python program, and create an installer that will install it on Windows?
(Specifics: My program is in Python 2.6.6, with PyGTK, on Ubuntu 10.10, on VirtualBox, on Windows. I do not have admin rights on my Windows machine, so I am limited in what I can install on the Windows side.)
Upvotes: 4
Views: 413
Reputation: 2609
py2exe will get you a win32 exe file, along with a few pyd files and a zip archive. You can zip the entire dist folder and deploy it that way. However, if you need a GUI simple user installer you'll have to build that in a separate step.
Options:
create Zip archive, manually extract
DOS style BAT file to copy specific files to predefined locations
Build a MSI style installer using WiX. This can be done by running Mono for Windows under Wine.
Bite the bullet, get access to a Windows box (real or virtual) and use py2exe along with NSIS or Inno Setup. There are some nice examples on the py2exe wiki that show how to combine the py2exe setup script with the automatic creation and generation of the Innosetup script. One command on the commandline , python setup.py py2exe
and out pops an installer exe.
As mentioned above, py2exe isn't ready for Python 3.x yet.
Upvotes: 1