I have lot of pain while compiling pyside code for Linux...much less for Windows, and my source is around 300kb. I would like to know what is the safest way to compile it.
My only experience is with cx_freeze (using python 3.3). It works in Windows/Linux/OSX. A simple example can be found here (with its documentation): http://cx-freeze.readthedocs.org/en/latest/distutils.html#distutils
Another example:
from cx_Freeze import setup, Executable
# dependencies
build_exe_options = {
"packages": ["os", "sys", "glob", "simplejson", "re", "atexit", "PySide.QtCore", "PySide.QtGui", "PySide.QtXml"],
"include_files": [("./example/Ui/MainWindow.ui", "Ui/MainWindow.ui"),
("./example/Ui/ExampleWidget.ui", "Ui/ExampleWidget.ui"),
("./example/Ui/TestDialog.ui", "Ui/TestDialog.ui"),
("./example/Resources/style.qss", "Ui/style.qss")], # this isn't necessary after all
"excludes": ["Tkinter", "Tkconstants", "tcl"],
"build_exe": "build",
"icon": "./example/Resources/Icons/monitor.ico"
}
executable = [
Executable("./bin/Example.py",
base="Win32GUI",
targetName="Example.exe",
targetDir="build",
copyDependentFiles=True)
]
setup(
name="Example",
version="0.1",
description="Example", # Using the word "test" makes the exe to invoke the UAC in win7. WTH?
author="Me",
options={"build_exe": build_exe_options},
executables=executable,
requires=['PySide', 'cx_Freeze', 'simplejson']
)