Distributing enaml applications

286 views
Skip to first unread message

ALFONSO REYES

unread,
Jan 11, 2016, 5:37:27 PM1/11/16
to Enaml
I have been experimenting with different Python installers but I cannot get with any of them a full workable executable. For some reason any of these tools miss a package or module during the packaging. I have tried with PyInstaller, py2exe, cx_freeze, pynsist with no success.
Has someone has a procedure to generate a distributable enaml application for Windows?
Thanks.

bryan cole

unread,
Mar 2, 2016, 11:46:27 AM3/2/16
to Enaml
This reply is a bit belated but since no-one else replied, I though I might as well chime in.

We have a engineering-type Enaml GUI app which includes chaco plots (i.e. Enaml/atom/traits/traitsui/traits-enaml/chaco/numpy/scipy and various other libraries as well). We distribute this app on Windows. Our distribution solution involves providing our "own" python distribution which is simply the vanilla python.org python but relocated into a custom location under PROGRAM_FILES. In this way, this doesn't conflict with any other python install that the user might have. We include in this distribution all the libraries which cannot easily be distributed as eggs. This means PyQt / WX, numpy, scipy and a few other egg-unfriendly libs.

All other 3rd party libraries we distribute as egg-files (zipped where possible but enaml doesn't like working from zipped form). All the Enthought tool suite libs work fine from eggs (but traitsui must be unzipped for path-reasons).

Our application code (pure python) is also packaged as an egg. The entry-point to the application simply adds the location of the eggs to the sys.path and imports the main function from our library and off it goes.

We package all this up using InnoSetup although I imagine the other installer-options would work just as well. Inno is nice and easy to understand. We end up with two installers, one for the "Python Runtime" which runs to about 150MB because of some of the big libraries it contains. The user needs only install this once. Then there is the second application installer which includes our application code plus eggs as required. This is typically 13MB and gets updated frequently.

We have arrived at this scheme after many years of frustration with tools like py2exe, bbFreeze,  etc. Anyone who tells you "pip is the answer", "yeay, zc-buildout!" or "wheels are our saviour!" or "easyinstall is sooo broken" hasn't faced the Windows Deployment Problem. Eggs are your friend. Their key feature is that they are "zero-install", just like a DLL or a java jar-file. Wheels don't support this (explicitly).

BC

Brad Buran

unread,
Sep 21, 2018, 11:34:07 PM9/21/18
to Enaml
Hi Bryan,

I know this is a very old post, but I am now encountering a similar issue. I have a complex GUI app for running experiments (https://github.com/bburan/psiexperiment) that I'd like to package using some sort of installer. I'd like to learn more about how your approach works. Any chance you can share your build scripts, or is this for a proprietary application?

Brad
Reply all
Reply to author
Forward
0 new messages