Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Wine and py2exe to create windows application out of a Python project

I recently built an application, for a client, which has several python files. I use ubuntu, and now that I am finished, I would like to give this to the client in a way that would make it easy for her to use in windows.

I have looked into py2exe with wine, as well as cx_freeze and some other stuff, but cannot find a straightforward tutorial or useful documentation for turning many python files in ubuntu into an easy-to-use windows application or executable or anything really.

Thanks!

like image 504
user1266969 Avatar asked Mar 13 '12 16:03

user1266969


1 Answers

This page appears to have a solution, as the asker didn't reply:

  1. Install WINE.
  2. Use WINE to install Python 2.3.
  3. Use WINE to install py2exe.
  4. Make a setup.py file for py2exe to compile your script:
from distutils.core import setup
import py2exe

setup(name="vervang",
  scripts=["vervang.py"],
)
  • Run wine python.exe setup.py py2exe

This page says the resulting binaries might not be valid Win32 executables, though.

like image 104
Cees Timmerman Avatar answered Oct 05 '22 23:10

Cees Timmerman