[Windows] py2exe version

Registered by matysek

1) collect all windows dependencies (imagemagick, jpegtran, ...)

2) build with py2exe

Blueprint information

Status:
Started
Approver:
Stani
Priority:
Essential
Drafter:
Stani
Direction:
Approved
Assignee:
Nadia Alramli
Definition:
Approved
Series goal:
Accepted for 0.2
Implementation:
Beta Available
Milestone target:
milestone icon 0.2.8
Started by
Stani

Related branches

Sprints

Whiteboard

stani, 22/9/2009

Our plan is to follow the strategy that taskcoach
uses: to have a setup.py file and seperate make.py files for each
platform (py2exe, py2app).

http://www.taskcoach.org/

Please have a look how taskcoach handles this.

Check out their subversion repository:
svn co https://taskcoach.svn.sourceforge.net/svnroot/taskcoach taskcoach
(see http://sourceforge.net/scm/?type=svn&group_id=130831)

Read first the HACKING.txt
http://taskcoach.svn.sourceforge.net/viewvc/taskcoach/trunk/taskcoach/HACKING.txt?view=markup

Have a look at their setup files:
http://taskcoach.svn.sourceforge.net/viewvc/taskcoach/trunk/taskcoach/setup.py?view=markup
http://taskcoach.svn.sourceforge.net/viewvc/taskcoach/trunk/taskcoach/make.py?view=markup

Note the explicit inclusion of the i18n modules. For Phatch we have to
do the same for i18n, but also for phatch/actions as they are
dynamically imported with __import__ as well.

See if you can recreate their app with:
python make.py py2exe
(see HACKING.txt)

If that works it should be trivial for Phatch as well. I know the
author of Taskcoach personally. If really necessary, I could bother
him with some questions you have. Taskcoach is very similar in
requirements as Phatch (wxpython application). So adapting their work
might be a time saver.

matysek, 29/8/2009

I think many users will appreciate standalone executables of Phatch. (without the need to install python, wx, PIL).

I would recommend trying for implementing this, the pyinstaller. The main advantage of pyinstaller, in contrast to py2exe or py2app, is that pyinstaller ( http://ww.pyinstaller.org ) supports creating standalone executables for linux, windows and even mac (for mac only in svn).

Yesterday I've tried to use pyinstaller on Phatch (tutorial: http://www.pyinstaller.org/export/latest/trunk/doc/Manual.html?format=raw )
Only following this tutorial I was able create standalone executable of phatch on my linux box and execute it. The issue was that phatch reported some mising files and runtime errors. Perhaps not all necessary depend. were included. The folder with phatch executable and its dependecies was around ~40 MB.

When trying to create executable, the main issues I'm experiencing:
- whe looking at phatch source, it's not clear to me, how paths are handling
- some imports are not recognized by pyinstaller when using method 'fix_python_path' many times. e.g:
  in phatch.core.config:
  from fonts import set_font_cache

(?)

Work Items

Dependency tree

* Blueprints in grey have been implemented.

This blueprint contains Public information 
Everyone can see this information.