Deploying applications

Hi Guys,

I have some generic questions about deploying applications:

* Has anyone tried to make a Windows app with wxPython and deploy it to users? Is it hard? What about Mac OS X?

* Is it hard to use PyInstaller or py2exe to make a single-file executable for for people who don't have Python? My application would only require wxPython and SQLite. Do you think those would work with PyInstaller or py2exe?

* Does wxPython really look native under Windows and Mac? Some of the UI differences between platforms are things like button order. Is it hard to customize the app so that it look "right" in each platform?

Any other comments or experiences you'd like to share?

Personally, I'm a Linux guy, but I want to try writing a simple app that works across platforms. This is just a "for fun" project. I think it'd be nice to be able to make a desktop app that my friends who are still stuck with Windows can use.

Cheers,
Daniel.

Hi,

2010/1/13 Daniel Carrera:

Hi Guys,

I have some generic questions about deploying applications:

* Has anyone tried to make a Windows app with wxPython and deploy it to
users? Is it hard? What about Mac OS X?

Lots of us do. I have no idea about Mac but py2exe works like a charm
on Windows. You may also try my GUI2Exe project:

http://code.google.com/p/gui2exe/

which is a GUI frontend to all the "executable builders" available for Python.

* Is it hard to use PyInstaller or py2exe to make a single-file executable
for for people who don't have Python? My application would only require
wxPython and SQLite. Do you think those would work with PyInstaller or
py2exe?

Of course they will. However, I suggest you not to try and build a
single file executable but to package the result of py2exe (or
PyInstaller or whatever) on Windows using InnoSetup. Most of us do
this to deploy applications.

* Does wxPython really look native under Windows and Mac? Some of the UI
differences between platforms are things like button order. Is it hard to
customize the app so that it look "right" in each platform?

You don't have to customize anything, wxPython will look native on
Windows as it will on the Mac as long as the source code runs on both
platforms.

Any other comments or experiences you'd like to share?

See here:

http://wiki.wxpython.org/py2exe
CreatingStandaloneExecutables - wxPyWiki (a bit out of date)
DistributingYourApplication - wxPyWiki

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

Hi

···

2010/1/13 Daniel Carrera <dcarrera@gmail.com>:

* Has anyone tried to make a Windows app with wxPython and deploy it to
users? Is it hard? What about Mac OS X?

Yes, I'm using py2exe (Win) and py2app (Mac). Both tools are pretty
easy to use (but that's subjective isn't it?).

Martin Weberg

Andrea Gavana wrote:

Lots of us do. I have no idea about Mac but py2exe works like a charm
on Windows. You may also try my GUI2Exe project:

Google Code Archive - Long-term storage for Google Code Project Hosting.

which is a GUI frontend to all the "executable builders" available for Python.

Sounds great! I really like the fact that you don't have to compile it. I wouldn't enjoy trying to compile Python stuff on Windows (I don't have a lot of experience with either Python or Windows).

Your GUI2exe looks great!

I can't try it because Ubuntu only comes with Python version 2.6.4, but I'll try to compile Python later so I can give it a try.

* Is it hard to use PyInstaller or py2exe to make a single-file executable
for for people who don't have Python? My application would only require
wxPython and SQLite. Do you think those would work with PyInstaller or
py2exe?

Of course they will. However, I suggest you not to try and build a
single file executable but to package the result of py2exe (or
PyInstaller or whatever) on Windows using InnoSetup. Most of us do
this to deploy applications.

Any reason why a single file executable is not a good idea?

I notice that your GUI2exe can make InnoSetup scripts. Yay.

* Does wxPython really look native under Windows and Mac? Some of the UI
differences between platforms are things like button order. Is it hard to
customize the app so that it look "right" in each platform?

You don't have to customize anything, wxPython will look native on
Windows as it will on the Mac as long as the source code runs on both
platforms.

But wait... surely I'll have to customize the order of buttons and whatever other conventions are different between platforms...

See here:

py2exe - wxPyWiki
CreatingStandaloneExecutables - wxPyWiki (a bit out of date)
DistributingYourApplication - wxPyWiki

Excellent information. Thanks!

Cheers,
Daniel.

Daniel Carrera wrote:

Andrea Gavana wrote:

Lots of us do. I have no idea about Mac but py2exe works like a charm
on Windows. You may also try my GUI2Exe project:

Google Code Archive - Long-term storage for Google Code Project Hosting.

which is a GUI frontend to all the "executable builders" available for Python.

Sounds great! I really like the fact that you don't have to compile it. I wouldn't enjoy trying to compile Python stuff on Windows (I don't have a lot of experience with either Python or Windows).

Your GUI2exe looks great!

I can't try it because Ubuntu only comes with Python version 2.6.4, but I'll try to compile Python later so I can give it a try.

Gui2Exe is just Python code, so it should work under Py 2.6.4 without problems, nor needing to compile Python.

* Is it hard to use PyInstaller or py2exe to make a single-file executable
for for people who don't have Python? My application would only require
wxPython and SQLite. Do you think those would work with PyInstaller or
py2exe?

Of course they will. However, I suggest you not to try and build a
single file executable but to package the result of py2exe (or
PyInstaller or whatever) on Windows using InnoSetup. Most of us do
this to deploy applications.

Any reason why a single file executable is not a good idea?

They are much more difficult to get right - not worse the hassle in my view.

I notice that your GUI2exe can make InnoSetup scripts. Yay.

* Does wxPython really look native under Windows and Mac? Some of the UI
differences between platforms are things like button order. Is it hard to
customize the app so that it look "right" in each platform?

You don't have to customize anything, wxPython will look native on
Windows as it will on the Mac as long as the source code runs on both
platforms.

But wait... surely I'll have to customize the order of buttons and whatever other conventions are different between platforms...

Don't think so - also I never done it myself. I believe the buttons move e.g. on the Mac if you use the correct wx.ID's when creating them.

The following pages give you some tips on what to do to ensure that it works across platforms.

http://wiki.wxpython.org/RecipesCrossPlatform
http://wiki.wxpython.org/Some%20General%20Cross%20Platform%20Guidelines
http://wiki.wxpython.org/wxPython%20Platform%20Inconsistencies

Werner

werner wrote:

I can't try it because Ubuntu only comes with Python version 2.6.4, but I'll try to compile Python later so I can give it a try.

Gui2Exe is just Python code, so it should work under Py 2.6.4 without problems, nor needing to compile Python.

% python GUI2Exe.py
wxPython >= 2.8.8.0 is required

Any reason why a single file executable is not a good idea?

They are much more difficult to get right - not worse the hassle in my view.

Ok.

But wait... surely I'll have to customize the order of buttons and whatever other conventions are different between platforms...

Don't think so - also I never done it myself. I believe the buttons move e.g. on the Mac if you use the correct wx.ID's when creating them.

The following pages give you some tips on what to do to ensure that it works across platforms.

RecipesCrossPlatform - wxPyWiki
Some General Cross Platform Guidelines - wxPyWiki
wxPython Platform Inconsistencies - wxPyWiki

Thanks.

Daniel Carrera wrote:

werner wrote:

I can't try it because Ubuntu only comes with Python version 2.6.4, but I'll try to compile Python later so I can give it a try.

Gui2Exe is just Python code, so it should work under Py 2.6.4 without problems, nor needing to compile Python.

% python GUI2Exe.py
wxPython >= 2.8.8.0 is required

It is wxPython where it needs 2.8, but with Python 2.6.x you should use wxPython 2.8.10.1 as I believe only that contained some fixes for Python 2.6x in relation to the manifest handling (Side By Side - sxs by Microsoft).

http://wiki.wxpython.org/py2exe

Werner

werner wrote:

It is wxPython where it needs 2.8, but with Python 2.6.x you should use wxPython 2.8.10.1 as I believe only that contained some fixes for Python 2.6x in relation to the manifest handling (Side By Side - sxs by Microsoft).

Thanks, I wasn't reading. From Cody's email, it looks like there are other good reasons to upgrade wxPython.

Should I upgrade Python too? Or am I ok with the 2.6.4 I have?

Cheers,
Daniel.

Daniel Carrera wrote:

werner wrote:

It is wxPython where it needs 2.8, but with Python 2.6.x you should use wxPython 2.8.10.1 as I believe only that contained some fixes for Python 2.6x in relation to the manifest handling (Side By Side - sxs by Microsoft).

Thanks, I wasn't reading. From Cody's email, it looks like there are other good reasons to upgrade wxPython.

Should I upgrade Python too? Or am I ok with the 2.6.4 I have?

I believe that most of us are still using 2.5.x for production stuff, some might even still be on 2.4.x. I personally have only started to evaluate 2.6 some time ago (late last year) and have some issues with libraries I need which are not yet updated at that time.

Using 2.6.4 is fine, but you might run into libraries which are not yet updated to it. You can nott use Python 2.7.x or 3.x if you want to use wxPython as there is no version available yet.

Werner

werner wrote:

Should I upgrade Python too? Or am I ok with the 2.6.4 I have?

I believe that most of us are still using 2.5.x for production stuff, some might even still be on 2.4.x. I personally have only started to evaluate 2.6 some time ago (late last year) and have some issues with libraries I need which are not yet updated at that time.

Using 2.6.4 is fine, but you might run into libraries which are not yet updated to it. You can nott use Python 2.7.x or 3.x if you want to use wxPython as there is no version available yet.

Ah, thanks. You can tell that I don't use Python a lot. I've played with it for years, but I've never had to care about what version I had.

Cheers,
Daniel.

I second this. I tried creating one executable and it worked
beautifully for 99% of my users. Unfortunately, there were a small
number that it would just crash on. The py2exe guys said that the one
exe thing, while great, doesn't always work that well.

This article of mine goes over the steps of creating an exe with
GUI2Exe and Inno Setup:

It was written before Andrea added his auto-Inno scripting, so that's
not in there. He's updated other stuff and the UI itself is a little
different in the newer versions, but I think the tutorial is still
useful. I need to spend some time writing a new tutorial, but I have a
backlog of other ones I want to get done.

···

On Jan 13, 6:33 am, werner <wbru...@free.fr> wrote:

Daniel Carrera wrote:
> Andrea Gavana wrote:
>> Lots of us do. I have no idea about Mac but py2exe works like a charm
>> on Windows. You may also try my GUI2Exe project:

>>Google Code Archive - Long-term storage for Google Code Project Hosting.

>> which is a GUI frontend to all the "executable builders" available
>> for Python.

> Sounds great! I really like the fact that you don't have to compile
> it. I wouldn't enjoy trying to compile Python stuff on Windows (I
> don't have a lot of experience with either Python or Windows).

> Your GUI2exe looks great!

> I can't try it because Ubuntu only comes with Python version 2.6.4,
> but I'll try to compile Python later so I can give it a try.

Gui2Exe is just Python code, so it should work under Py 2.6.4 without
problems, nor needing to compile Python.

>>> * Is it hard to use PyInstaller or py2exe to make a single-file
>>> executable
>>> for for people who don't have Python? My application would only require
>>> wxPython and SQLite. Do you think those would work with PyInstaller or
>>> py2exe?

>> Of course they will. However, I suggest you not to try and build a
>> single file executable but to package the result of py2exe (or
>> PyInstaller or whatever) on Windows using InnoSetup. Most of us do
>> this to deploy applications.

> Any reason why a single file executable is not a good idea?

They are much more difficult to get right - not worse the hassle in my view.

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org

PyCon 2010 Atlanta Feb 19-21 http://us.pycon.org/

Daniel Carrera wrote:

% python GUI2Exe.py
wxPython >= 2.8.8.0 is required

That's wx, not python itself -- there is no Python 2.8

Hopefully, Ubuntu is delivering a recent wxPython. Try:

import wx
wx.__version__

to be sure.

Should I upgrade Python too? Or am I ok with the 2.6.4 I have?

that is the latest in the 2.* series, and wx does not yet support 3.*

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

I can't try it because Ubuntu only comes with Python version 2.6.4, but I'll
try to compile Python later so I can give it a try.

I just checked the Ubuntu repositories and wxPython 2.8.10 is listed there.
I upgraded this way a bit back from 2.6. It's always a good idea to upgrade
wxPython and stay fairly current, as there are fixes and/or new goodies added
each upgrade.

I use Python 2.5, for what it's worth. Works well for any purpose I'll need.

Che

See py2exe - wxPyWiki and this: http://groups.google.com/group/comp.lang.python/browse_frm/thread/54e419bf4cf17375

···

On 1/13/10 1:00 AM, GadgetSteve@live.co.uk wrote:

The only serious issue I have is that while distributing with Python 2.5
works fine - one or two windows dlls that did not get included by
default that were on the majority of machines we were using that were
not on a virgin XP machine but that was soon taken care of - with Python
2.6 I have yet to get a successful package put together because of
something called side by side dll distribution - (from MicroSnot not the
Python team). I expect to work it out eventually but for the moment we
are sticking with Python 2.5 because of it.

--
Robin Dunn
Software Craftsman

Hi Daniel.

Hi Guys,

I have some generic questions about deploying applications:

* Has anyone tried to make a Windows app with wxPython and deploy it to
users? Is it hard? What about Mac OS X?

You may want to look into Task Coach (http://www.taskcoach.org). It
comes with three different Windows distributions (Innosetup installer,
PortableApps, WinPenPack), one Mac OS X disk image, a Deb package for
Debian and Ubuntu, RPM's for Fedora and other Linux flavors, and
source distributions of course. All distributions are built
automatically from release scripts. The release process itself is
largely automated as well, including uploading to Sourceforge,
notifications to Twitter, Identi.ca, Freshmeat, mailinglists, PyPi,
etc.

Cheers, Frank

(Task Coach developer)

···

2010/1/13 Daniel Carrera <dcarrera@gmail.com>:

I've used py2app for my OS X application and it works very well and is
quite simple.
Apparently it is very similar to py2exe (I've never used py2exe so
can't confirm that).

I then use hdiutil to bundle the app into a .dmg file (compressed disk
image).

I no nothing of InnoSetup and whether it is relevant to OS X too, or
just windows. Something to investigate :slight_smile:

Cheers, Brendan.

···

On Jan 13, 7:24 pm, Andrea Gavana <andrea.gav...@gmail.com> wrote:

Hi,

2010/1/13 Daniel Carrera:

> Hi Guys,

> I have some generic questions about deploying applications:

> * Has anyone tried to make a Windows app with wxPython and deploy it to
> users? Is it hard? What about Mac OS X?

Lots of us do. I have no idea about Mac but py2exe works like a charm
on Windows. You may also try my GUI2Exe project:

Google Code Archive - Long-term storage for Google Code Project Hosting.

which is a GUI frontend to all the "executable builders" available for Python.

> * Is it hard to use PyInstaller or py2exe to make a single-file executable
> for for people who don't have Python? My application would only require
> wxPython and SQLite. Do you think those would work with PyInstaller or
> py2exe?

Of course they will. However, I suggest you not to try and build a
single file executable but to package the result of py2exe (or
PyInstaller or whatever) on Windows using InnoSetup. Most of us do
this to deploy applications.

> * Does wxPython really look native under Windows and Mac? Some of the UI
> differences between platforms are things like button order. Is it hard to
> customize the app so that it look "right" in each platform?

You don't have to customize anything, wxPython will look native on
Windows as it will on the Mac as long as the source code runs on both
platforms.

> Any other comments or experiences you'd like to share?

See here:

http://wiki.wxpython.org/py2exehttp://wiki.wxpython.org/CreatingStandaloneExecutables(a bit out of date)DistributingYourApplication - wxPyWiki

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."http://xoomer.alice.it/infinity77/http://thedoomedcity.blogspot.com/

Brendan wrote:

I've used py2app for my OS X application and it works very well and is
quite simple.
Apparently it is very similar to py2exe (I've never used py2exe so
can't confirm that).

yes, it is, in API anyway, but different enough to be annoying!

I then use hdiutil to bundle the app into a .dmg file (compressed disk
image).

I no nothing of InnoSetup and whether it is relevant to OS X too, or
just windows.

It's a Windows thing -- what you are doing is the easiest way on OS-X. *.app bundles let you put all sorts of stuff in a single directory that looks to the casual user like a single file -- so you are getting something similar to what py2exe gives you, but it's easier to deploy.

-Chris

···

--
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

Chris.Barker@noaa.gov

Frank Niessink wrote:

Hi Daniel.

Hi Guys,

I have some generic questions about deploying applications:

* Has anyone tried to make a Windows app with wxPython and deploy it to
users? Is it hard? What about Mac OS X?
    
You may want to look into Task Coach (http://www.taskcoach.org). It
comes with three different Windows distributions (Innosetup installer,
PortableApps, WinPenPack), one Mac OS X disk image, a Deb package for
Debian and Ubuntu, RPM's for Fedora and other Linux flavors, and
source distributions of course. All distributions are built
automatically from release scripts. The release process itself is
largely automated as well, including uploading to Sourceforge,
notifications to Twitter, Identi.ca, Freshmeat, mailinglists, PyPi,
etc.

Cheers, Frank

(Task Coach developer)
  

Hi Frank,

Can you expand upon this release process of yours, please? Releasing my
application takes ~2 hours, as I must:

- download the latest translations MOs from launchpad

build the deb package on Linux, which I do through launchpad's PPA system
create an RPM from the deb using alien
tar the source code

come back to windows
use Gui2exe to:
- ensure I have the latest files selected to build (or add any new files
from the release)
- build my app, check no new features have broken the exe
- run UPX on the exe
- run innosetup

Now, uploading:
- upload: the .deb, .rpm, .tar.gz, my installer exe, and "stand-alone"
exe, in a .zip to:
  - google code
  - sourceforge
  - launchpad
all while choosing the right files/filling in file descriptions. This is
around 30MB of uploading

make freshmeat/launchpad announcements

Heaven forbid that I release some nasty bug, and have to bring out an
emergency hotfix right away, and repeat the whole process!

As you can imagine, it's a bit of a nightmare, but I haven't tried to
automate any of it, as I figured the coding/debugging effort alone would
take a long, long time.

Regards,
Steven Sproat

···

2010/1/13 Daniel Carrera <dcarrera@gmail.com>: