Hi all,

Apologies for a slightly off-topic post, but I'd like to get feedback on
something that this community might be interested in. I've been
investigating an alternative way to distribute Python applications on
Windows without freezing them. My approach builds an installer which first
sets up Python on the computer, and then installs the application as
regular Python files.

I have a sample installer which sets up an application, complete with start
menu shortcut, icon, and uninstaller. The idea is that this is a template:
you can copy the source file, edit it to suit your own application, and run
a simple command to build the installer.

Template repository: https://github.com/takluyver/py-nsis-template
Example installer: http://ubuntuone.com/7Riz8Uew7Z3Fj1KwWigfIP

The advantages of this are:
- You avoid all the problems with freezing Python code, such as modules
that assume that they have a __file__ attribute pointing to a regular
filesystem location.
- The user gets a full Python, which they can easily install other modules
into later using standard methods.
- You can build a Windows installer on Linux or Mac (thanks to NSIS)

The disadvantages are:
- Larger installers - an installer with just Python and no other code is
already about 20 MB. cx_Freeze tries to select only the modules which you
need.
- Windows only - although you can make the installer on any platform, it's
always a Windows installer.

At present, it's a very simple set up (it just installs a single Python
script), but it could certainly be extended to handle modules and packages,
other dependencies, downloading Python from the internet instead of
including it, and many other options.

If you're interested in distributing Python apps on Windows, please have a
look at this and let me know what you think.

Thanks,
Thomas
------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
cx-freeze-users mailing list
cx-freeze-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cx-freeze-users

Reply via email to