Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 | Next >

Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by harijay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi I have an OSX 10.5 running 64 bit leopard laptop.

I have a python application that uses wxpython , reportlab and pyyaml
(yaml) libraries.

I am trying to build the app on Leopard and deploy it on Tiger using
the following setup.py ( see below)
However the *.app does not work and gives an error when the *.app is
double clicked ( see attached png ). It understandeably complains
about the Info.plist not having the correct PyRuntimeLocations array.

What modifications do I have to make to the setup.py to get an app
built on Leopard to run on Tiger ( both power-pc and intel).
I am currently building against the System Python from
/Library/Python/2.5/ and subversion version of py2applet.

The app size is not limiting since its for an intranet distribution.

Thanks for your help in advance
Hari


setup.py:


"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['GridZilla.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True,
 'iconfile': './gzilla_ico_fin.icns',
 'packages': 'wx,reportlab,yaml',
 'prefer_ppc': True}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)


_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Picture 3.png (41K) Download Attachment

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Ned Deily :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In article
<aad3caa30910051157p5f63b9ffue12fe71b1d38678d@...>,
 hari jayaram <harijay@...> wrote:

> Hi I have an OSX 10.5 running 64 bit leopard laptop.
>
> I have a python application that uses wxpython , reportlab and pyyaml
> (yaml) libraries.
>
> I am trying to build the app on Leopard and deploy it on Tiger using
> the following setup.py ( see below)
> However the *.app does not work and gives an error when the *.app is
> double clicked ( see attached png ). It understandeably complains
> about the Info.plist not having the correct PyRuntimeLocations array.
>
> What modifications do I have to make to the setup.py to get an app
> built on Leopard to run on Tiger ( both power-pc and intel).
> I am currently building against the System Python from
> /Library/Python/2.5/ and subversion version of py2applet.

If you want to use python2.5, install a python2.5 from python.org:
   http://www.python.org/download/releases/2.5.4/
That python (/usr/local/bin/python2.5) will work on both Tiger and
Leopard.  Reinstall your dependent packages (setuptools, py2app, wx,
reportlab, yaml) with that python.   By default, commands for those
packages will be installed to
/Library/Frameworks/Python.framework/Versions/2.5/bin, which may or may
not be first on your shell $PATH.  When running py2app from there, it
should include python in the app bundle (it will not do this when using
the built-in Apple python) so the app should run on any 10.4 or 10.5
system.

--
 Ned Deily,
 nad@...

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Ned Deily :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In article <nad-B010AE.11274006102009@...>,
 Ned Deily <nad@...> wrote:
> That python (/usr/local/bin/python2.5) will work on both Tiger and
> Leopard.  Reinstall your dependent packages (setuptools, py2app, wx,
> reportlab, yaml) with that python.

I should add that you need to make sure all the executables are targeted
for 10.4.  To do that, ensure that the 10.4u SDK is installed from Xcode
and add:
  export MACOSX_DEPLOYMENT_TARGET=10.4
to your shell sessions before building anything.  Python distutils
should do this for automatically (at least it does for python 2.6) but
you may need to tweak configure scripts etc if any dependencies are not
being built by the equivalent of a python setup.py (or easy_install).  
Good luck!

--
 Ned Deily,
 nad@...

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Ned Deily :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

One last thought!  If you have access to a tiger machine, it may very
well be easier and safer if you build the app on 10.4.  It should then
run on both 10.4 and 10.5.  OS X 10.n -> 10.n+1 compatibility is usually
a given but 10.n -> 10.n-1 is not.  The latest pythons (2.6.x) go to
some trouble to ensure downward compatibility but that may not be true
of other dependencies.  Just follow the same outline about installing
the python.org python and dependencies.

--
 Ned Deily,
 nad@...

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by harijay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Ned thanks a tonne for your suggestions.
I have gone ahead and installed python.org python 2.6 to the
intel-leopard laptop and with dependencies for the app i.e wx
(wxpython 2.8.10) , reportlab and pyyaml  and the subversion build of
py2app. The app works fine with this python 2.6

I am using the setup.py pasted below.

I can build an app using a simple setup.py. The app however does not
launch on my machine and instead reports the following error

"ImportError:'/Library/Frameworks/Python.Framework/Versions/2.6/lib/python2.6/-lib-dynload/wx/_core_.so'
 not found

With the Apple Python 2.5 and wx version 2.8.4.0 and the same setup.py
I dont get this error but then the built app does not work on tiger or
power-pc.

So my question is
1) How do I get the wx _core_.so to be included . Since it is nowhere
on my filesystem DO I have to manually build wxpython

2) Could it be a simple error in my setup.py for py2app that is
creating this problem. I have emailed the wxpython list to enquire as
to why the _core_.so wx library is not being included.

Thanks for your help in advance, my setup.py is pasted below here
Hari Jayaram


###########################
setup.py that creates the *.app:
#########################
"""
This is a setup.py script generated by py2applet

Usage:
   python setup.py py2app
"""

from setuptools import setup

APP = ['GridZilla.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True, 'iconfile': './gzilla_ico_fin.icns'}

setup(
   app=APP,
   data_files=DATA_FILES,
   options={'py2app': OPTIONS},
   setup_requires=['py2app'],
)

I get the app to build but it gives as
On Tue, Oct 6, 2009 at 2:56 PM, Ned Deily <nad@...> wrote:

> One last thought!  If you have access to a tiger machine, it may very
> well be easier and safer if you build the app on 10.4.  It should then
> run on both 10.4 and 10.5.  OS X 10.n -> 10.n+1 compatibility is usually
> a given but 10.n -> 10.n-1 is not.  The latest pythons (2.6.x) go to
> some trouble to ensure downward compatibility but that may not be true
> of other dependencies.  Just follow the same outline about installing
> the python.org python and dependencies.
>
> --
>  Ned Deily,
>  nad@...
>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@...
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Aahz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Oct 06, 2009, Ned Deily wrote:
>
> One last thought!  If you have access to a tiger machine, it may very
> well be easier and safer if you build the app on 10.4.  It should then
> run on both 10.4 and 10.5.  OS X 10.n -> 10.n+1 compatibility is usually
> a given but 10.n -> 10.n-1 is not.  The latest pythons (2.6.x) go to
> some trouble to ensure downward compatibility but that may not be true
> of other dependencies.  Just follow the same outline about installing
> the python.org python and dependencies.

What is your recommendation for supporting 10.4, 10.5, and 10.6?  Does
including PPC make any difference?
--
Aahz (aahz@...)           <*>         http://www.pythoncraft.com/

"....Normal is what cuts off your sixth finger and your tail..."  --Siobhan
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Ned Deily :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In article
<aad3caa30910061243k4954c118jb19aae56f9f6b9d8@...>,
 hari jayaram <harijay@...> wrote:

> I have gone ahead and installed python.org python 2.6 to the
> intel-leopard laptop and with dependencies for the app i.e wx
> (wxpython 2.8.10) , reportlab and pyyaml  and the subversion build of
> py2app. The app works fine with this python 2.6
>
> I am using the setup.py pasted below.
>
> I can build an app using a simple setup.py. The app however does not
> launch on my machine and instead reports the following error
>
> "ImportError:'/Library/Frameworks/Python.Framework/Versions/2.6/lib/python2.6/
> -lib-dynload/wx/_core_.so'
>  not found

I am not a wx user so I should probably stop at this point before I lead
you astray.  Perhaps the resident wx/py2app expert here (hi, Chris) will
chime in.  There also seems to be a wxpython-mac mailing list on google
groups.  That said, I notice that the current wxpython installer dmg
installs wxpython into /usr/local/lib and puts a wxredirect.pth into
python's site-packages library; I don't know whether py2app is smart
enough to handle that without a recipe.

Good luck!

--
 Ned Deily,
 nad@...

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Ned Deily :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In article <20091006203908.GA23886@...>,
 Aahz <aahz@...> wrote:
> What is your recommendation for supporting 10.4, 10.5, and 10.6?  Does
> including PPC make any difference?

For python in general (not wx), my experience with building current
python installers is that one can reliably build 2-way 32-bit i386/ppc
("fat") installers on either 10.5 or 10.4 that will work on 10.4, 10.5,
and 10.6.  That includes the small set of 3rd party libraries included
in the python.org installers (zlib, bzip2, sqlite3, ncurses, etc).   The
python.org installer builds use the 10.4u SDK as sysroot.  (It actually
sets MACOSX_DEPLOYMENT_TARGET=10.3 which, in theory, works for
10.3.9(?)+ as well but we don't do any testing on 10.3.)

Since the release of 10.6, I have done some experimenting with trying to
build installers this way on 10.6 and have run into various problems.  A
lot of things change in the default build chain on 10.6: gcc-4.2 instead
of -4.0, tools running in 64-bit mode by default, differences in the
10.4 SDK on 10.6 (which is not installed by default).  With the number
of other issues involved in getting 2.6.3 out the door, neither Ronald
nor I have spent a lot of time yet trying to work through all the 10.6
build issues; so far, it's been easier to just build on 10.5 (and I've
done test builds on 10.4 as well).  The results seem to work equally
well on 10.4, 10.5, and 10.6.

There are some additional complications for a python installer in that,
beyond just an executable to install, it provides a kind of user-build
environment, l.e. distuils, that needs to support user builds of
packages with C extension modules.  There were a few things added to
2.6.3 to make that work on 10.6, mainly ensuring a CC=/usr/bin/gcc-4.0
gets injected.  So far, that seems to work although it's a little messy
when extensions require additional 3rd-party libraries: they should also
be built with 4.0 and with compatible -archs.  But, presumably, most
*apps* built with python would not need to deal with those kinds of
issues.

The python installer build script (in Mac/BuildScript in release26 svn)
also supports a 4-way universal build option that adds 64-bit variants
for intel and ppc g5.  That can only be built and run on 10.5 and above
and, while it will install on 10.6, the various options it uses to
select 32- vs 64- don't work correctly there.  Typically you always end
up running in 64-bit mode.  Building an "intel" 2-way (32-/64-) on 10.6
has some similar issues.  This can be a problem if you need any of the
deprecated Macintosh modules from the standard library as most of them
depend on Carbon frameworks available in 32-bit only.  So it may be
better to stick to 32-bit only on 10.6 for the moment.

YMMV, of course.  Hope that helps.

--
 Ned Deily,
 nad@...

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Christopher Barker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ned Deily wrote:
>  hari jayaram <harijay@...> wrote:
>> I have gone ahead and installed python.org python 2.6 to the
>> intel-leopard laptop and with dependencies for the app i.e wx
>> (wxpython 2.8.10) , reportlab and pyyaml  and the subversion build of
>> py2app. The app works fine with this python 2.6

> I am not a wx user so I should probably stop at this point before I lead
> you astray.  Perhaps the resident wx/py2app expert here (hi, Chris) will
> chime in.

OK, if you insist.

> There also seems to be a wxpython-mac mailing list on google
> groups.

yes, and it's worth posting there -- I'm not sure everyone there is also
on this list.

>  That said, I notice that the current wxpython installer dmg
> installs wxpython into /usr/local/lib and puts a wxredirect.pth into
> python's site-packages library;

exactly -- that's how it supports both Apple's Python and python.org's

> I don't know whether py2app is smart enough to handle that without a recipe.

It has been for me -- I've had no problems with wx and Python2.5 and
OS-X 10.4, but I haven't tried newer versions of either.


 >> The app however does not
 >> launch on my machine and instead reports the following error
 >>
 >>
"ImportError:'/Library/Frameworks/Python.Framework/Versions/2.6/lib/python2.6/
 >> -lib-dynload/wx/_core_.so'
 >>  not found

What's odd is that it's looking in the wrong place -- as you've noticed,
the lib doesn't live there, and it should be looking inside the bundle
anyway.

Are you sure you're running the right python when you run py2app?

How big is the resulting app bundle?

Take a look in the bundle, and see what's there. ON an app of mine, for
instance, I have the wx libs in:

TheBundleName.app/Contents/Resources/lib/python2.5/lib-dynload/wx/

-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@...
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Christopher Barker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Aahz wrote:
> What is your recommendation for supporting 10.4, 10.5, and 10.6?  Does
> including PPC make any difference?

For maximum support, I use the 32bit Universal Python from python.org.
That should run everywhere 10.4 (and probably 10.3.9) and greater, Intel
and PPC. 64 bit is still sketchy (no wxPython support, for example).

You dependencies need to all be Universal and built with the 10.4 sdk.

The easiest way to accomplish all this is to build on 10.4.

-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@...
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by harijay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Chris , Ned and everyone else.
Thank you for your emails . I am still trying to solve the py2app
built app looking for _core_.so for wxpython in the wrong place

1) The app is 73 M big , so it looks quite beefy
(http://gridzilla.s3.amazonaws.com/demo-gzilla.dmg)

2) As Chris mentioned , the app seems to be looking for _core_.so for
the wxpython in the wrong place. I am seeing that in the following
location under my app
Contents/Resources/lib/python2.6/lib-dynload/wx

3) Also it does indeed seem like it is using the correct python , the
new python.org python 2.6 to build the app


4) I have uploaded the app as a dmg at this URL
(http://gridzilla.s3.amazonaws.com/demo-gzilla.dmg)
I would be very happy if anyone can help me troubleshoot it . My goal
is to get a " universal " binary which will run on Tiger and Leopard ,
32 and 64 bit .

Thanks a tonne
Hari


dhcp-129-64-45-53:wx hari$ pwd
/Users/hari/GridZilla.app/Contents/Resources/lib/python2.6/lib-dynload/wx
dhcp-129-64-45-53:wx hari$ ls
_controls_.so   _core_.so       _gdi_.so        _misc_.so       _windows_.so



On Wed, Oct 7, 2009 at 1:33 PM, Christopher Barker
<Chris.Barker@...> wrote:

> Ned Deily wrote:
>>
>>  hari jayaram <harijay@...> wrote:
>>>
>>> I have gone ahead and installed python.org python 2.6 to the
>>> intel-leopard laptop and with dependencies for the app i.e wx
>>> (wxpython 2.8.10) , reportlab and pyyaml  and the subversion build of
>>> py2app. The app works fine with this python 2.6
>
>> I am not a wx user so I should probably stop at this point before I lead
>> you astray.  Perhaps the resident wx/py2app expert here (hi, Chris) will
>> chime in.
>
> OK, if you insist.
>
>> There also seems to be a wxpython-mac mailing list on google groups.
>
> yes, and it's worth posting there -- I'm not sure everyone there is also on
> this list.
>
>>  That said, I notice that the current wxpython installer dmg installs
>> wxpython into /usr/local/lib and puts a wxredirect.pth into python's
>> site-packages library;
>
> exactly -- that's how it supports both Apple's Python and python.org's
>
>> I don't know whether py2app is smart enough to handle that without a
>> recipe.
>
> It has been for me -- I've had no problems with wx and Python2.5 and OS-X
> 10.4, but I haven't tried newer versions of either.
>
>
>>> The app however does not
>>> launch on my machine and instead reports the following error
>>>
>>>
>>> "ImportError:'/Library/Frameworks/Python.Framework/Versions/2.6/lib/python2.6/
>>> -lib-dynload/wx/_core_.so'
>>>  not found
>
> What's odd is that it's looking in the wrong place -- as you've noticed, the
> lib doesn't live there, and it should be looking inside the bundle anyway.
>
> Are you sure you're running the right python when you run py2app?
>
> How big is the resulting app bundle?
>
> Take a look in the bundle, and see what's there. ON an app of mine, for
> instance, I have the wx libs in:
>
> TheBundleName.app/Contents/Resources/lib/python2.5/lib-dynload/wx/
>
> -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@...
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@...
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by harijay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi everyone.
After Chris said that he has no problems with python 2.5.4 and
universal builds , I downloaded the python.org python 2.5.4 and the
wxpython for 2.5.4 unicode from the wx-site.

Using the subversion build of py2applet I cam getting the same error
when I run the built GridZilla.appa , i.e

"ImportError: '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/lib-dynload/wx/_core_.so'
not found"


So it looks like there must be something wrong in the way my py2applet
works , or it may be a Mac OSX Leopard specific issue.
Any ideas?
Thanks

Hari


On Wed, Oct 7, 2009 at 2:37 PM, hari jayaram <harijay@...> wrote:

> Hi Chris , Ned and everyone else.
> Thank you for your emails . I am still trying to solve the py2app
> built app looking for _core_.so for wxpython in the wrong place
>
> 1) The app is 73 M big , so it looks quite beefy
> (http://gridzilla.s3.amazonaws.com/demo-gzilla.dmg)
>
> 2) As Chris mentioned , the app seems to be looking for _core_.so for
> the wxpython in the wrong place. I am seeing that in the following
> location under my app
> Contents/Resources/lib/python2.6/lib-dynload/wx
>
> 3) Also it does indeed seem like it is using the correct python , the
> new python.org python 2.6 to build the app
>
>
> 4) I have uploaded the app as a dmg at this URL
> (http://gridzilla.s3.amazonaws.com/demo-gzilla.dmg)
> I would be very happy if anyone can help me troubleshoot it . My goal
> is to get a " universal " binary which will run on Tiger and Leopard ,
> 32 and 64 bit .
>
> Thanks a tonne
> Hari
>
>
> dhcp-129-64-45-53:wx hari$ pwd
> /Users/hari/GridZilla.app/Contents/Resources/lib/python2.6/lib-dynload/wx
> dhcp-129-64-45-53:wx hari$ ls
> _controls_.so   _core_.so       _gdi_.so        _misc_.so       _windows_.so
>
>
>
> On Wed, Oct 7, 2009 at 1:33 PM, Christopher Barker
> <Chris.Barker@...> wrote:
>> Ned Deily wrote:
>>>
>>>  hari jayaram <harijay@...> wrote:
>>>>
>>>> I have gone ahead and installed python.org python 2.6 to the
>>>> intel-leopard laptop and with dependencies for the app i.e wx
>>>> (wxpython 2.8.10) , reportlab and pyyaml  and the subversion build of
>>>> py2app. The app works fine with this python 2.6
>>
>>> I am not a wx user so I should probably stop at this point before I lead
>>> you astray.  Perhaps the resident wx/py2app expert here (hi, Chris) will
>>> chime in.
>>
>> OK, if you insist.
>>
>>> There also seems to be a wxpython-mac mailing list on google groups.
>>
>> yes, and it's worth posting there -- I'm not sure everyone there is also on
>> this list.
>>
>>>  That said, I notice that the current wxpython installer dmg installs
>>> wxpython into /usr/local/lib and puts a wxredirect.pth into python's
>>> site-packages library;
>>
>> exactly -- that's how it supports both Apple's Python and python.org's
>>
>>> I don't know whether py2app is smart enough to handle that without a
>>> recipe.
>>
>> It has been for me -- I've had no problems with wx and Python2.5 and OS-X
>> 10.4, but I haven't tried newer versions of either.
>>
>>
>>>> The app however does not
>>>> launch on my machine and instead reports the following error
>>>>
>>>>
>>>> "ImportError:'/Library/Frameworks/Python.Framework/Versions/2.6/lib/python2.6/
>>>> -lib-dynload/wx/_core_.so'
>>>>  not found
>>
>> What's odd is that it's looking in the wrong place -- as you've noticed, the
>> lib doesn't live there, and it should be looking inside the bundle anyway.
>>
>> Are you sure you're running the right python when you run py2app?
>>
>> How big is the resulting app bundle?
>>
>> Take a look in the bundle, and see what's there. ON an app of mine, for
>> instance, I have the wx libs in:
>>
>> TheBundleName.app/Contents/Resources/lib/python2.5/lib-dynload/wx/
>>
>> -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@...
>> _______________________________________________
>> Pythonmac-SIG maillist  -  Pythonmac-SIG@...
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>>
>
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Christopher Barker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hari jayaram wrote:
> 1) The app is 73 M big , so it looks quite beefy
> (http://gridzilla.s3.amazonaws.com/demo-gzilla.dmg)

yup, then it is bundling up everything (or trying to anyway!)

> 2) As Chris mentioned , the app seems to be looking for _core_.so for
> the wxpython in the wrong place. I am seeing that in the following
> location under my app
> Contents/Resources/lib/python2.6/lib-dynload/wx

so it's there where it should be.

now we are getting a bit out of my depth. py2app should be using
macholib to re-write the headers of various libs so that they will link
to copies in teh bundle, rather than the system one -- somethign seems
to be going wrong with tha process.

Are you using the latest py2app ans macholib:

$ easy_install py2app==dev

Look at the py2app output for errors, warnings.

> 4) I have uploaded the app as a dmg at this URL
> (http://gridzilla.s3.amazonaws.com/demo-gzilla.dmg)
> I would be very happy if anyone can help me troubleshoot it.

I've tried it out, and get the same error.

I think I found a problem, but I can't tell you why:

GridZilla.app/Contents/MacOS/python

is a symlink to:

/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python

In my bundles, built with 2.5, it is a genuine file.

That may explain why your bundle is looking for stuff in /Library/....

But I don't know why this happened.

Py2app does do that kind of linking for an "Alias" bundle, or when you
are using the system python, but it doesn't sound like you are doing that.

I don't know if this helps, but it's a start...

I want to go to 2.6 soon, but I'm not going to get a chance to mess with
it for a bit.

-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@...
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Christopher Barker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hari jayaram wrote:
> After Chris said that he has no problems with python 2.5.4 and
> universal builds , I downloaded the python.org python 2.5.4 and the
> wxpython for 2.5.4 unicode from the wx-site.
>
> Using the subversion build of py2applet I cam getting the same error
> when I run the built GridZilla.appa , i.e

how are you building? py2applet can also build alias bundles, which you
don't want. Your setup.py looked OK, but try running it with:

python setup.py py2app

to actually build the app.

(making sure you're using the python you intend to)

also, delete "build" and "dist" first, just to make sure.

-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@...
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by harijay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks Chris for your emails..

I was building using

python setup.py py2app

I was always rm -r -f 'ing build and dist directories and then running

python setup.py py2app

I even tried giving the full path to python to make absolutely sure it
was using the python i thought it was .
In every case the app bundle did end up containing the full python of
the correct version as i would expect.

SO despite doing a normal build,  there is a symlink within my
application to a python in my direcory tree.
Also the macholib version was also from the subversion tree .(
summarized on http://www.undefined.org/python/)

Maybe i need to borrow a tiger machine from someone and build the
application , because no matter which python i try 2.6.3 or 2.5.4 i
get the same linking issue with the app bundle built on leopard.
Thanks for trying things out.. I will continue tinkering.

Hari





On Wed, Oct 7, 2009 at 3:59 PM, Christopher Barker
<Chris.Barker@...> wrote:

> hari jayaram wrote:
>>
>> After Chris said that he has no problems with python 2.5.4 and
>> universal builds , I downloaded the python.org python 2.5.4 and the
>> wxpython for 2.5.4 unicode from the wx-site.
>>
>> Using the subversion build of py2applet I cam getting the same error
>> when I run the built GridZilla.appa , i.e
>
> how are you building? py2applet can also build alias bundles, which you
> don't want. Your setup.py looked OK, but try running it with:
>
> python setup.py py2app
>
> to actually build the app.
>
> (making sure you're using the python you intend to)
>
> also, delete "build" and "dist" first, just to make sure.
>
> -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@...
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@...
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Christopher Barker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hari jayaram wrote:
> Thanks Chris for your emails..

one more thought -- this is looking like it may have nothing to do with
wxPython -- try a simple "hello world" script, and see what happens.


-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@...
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by harijay :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Just tried a "hello world " app to troubleshoot py2app as Chris Barker
suggested.

When I say
open sayhello.app

Nothing happens. No additional console opens . IS this the normal behavior.

Here is my hello world style app and its setup.py ( see below)
Should the app created with py2app automatically open a console?
Even if I click on the *.app icon..nothing happens.

Hari

###############
printto100.py
###############
def main():
        print "Hello, world!"
        for i in range(100):
                print i
if __name__ == "__main__":
       main()

#############
setup.py
#############
"""
This is a setup.py script generated by py2applet

Usage:
    python setup.py py2app
"""

from setuptools import setup

APP = ['printo100.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True, 'iconfile': './gzilla_ico_fin.icns'}

setup(
    app=APP,
    data_files=DATA_FILES,
    options={'py2app': OPTIONS},
    setup_requires=['py2app'],
)



On Wed, Oct 7, 2009 at 7:28 PM, Christopher Barker
<Chris.Barker@...> wrote:

> hari jayaram wrote:
>>
>> Thanks Chris for your emails..
>
> one more thought -- this is looking like it may have nothing to do with
> wxPython -- try a simple "hello world" script, and see what happens.
>
>
> -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@...
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@...
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Latest Py2app bug..

by Christopher Barker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi folks,

hari jayaram wrote:
> Just tried a "hello world " app to troubleshoot py2app as Chris Barker
> suggested.

I was trying to help this guy out, and updated by py2app to the dev version:

easy_install py2app==dev

Now it's broken for me, on OS-X 10.4, Python.org 2.5:

(tested in a very simple "hello world" app, and also one that was
building fine yesterday, before I did the py2app upgrade.

I suspect this is some simple difference between python or OS-X version
differences.

-Chris


creating
/Users/cbarker/Junk/dist/printo100.app/Contents/Frameworks/Python.framework/Versions/2.5/Resources
Traceback (most recent call last):
   File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
line 589, in _run
     self.run_normal()
   File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
line 660, in run_normal
     self.create_binaries(py_files, pkgdirs, extensions, loader_files)
   File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
line 768, in create_binaries
     mm.mm.run_file(runtime)
   File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/macholib-1.2.1-py2.5.egg/macholib/MachOGraph.py",
line 62, in run_file
     m = self.findNode(pathname)
   File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/macholib-1.2.1-py2.5.egg/macholib/MachOGraph.py",
line 55, in findNode
     newname = self.locate(name)
   File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/macholib-1.2.1-py2.5.egg/macholib/MachOStandalone.py",
line 30, in locate
     return self.delegate.locate(newname)
   File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/macholib-1.2.1-py2.5.egg/macholib/MachOStandalone.py",
line 69, in locate
     res = self.copy_framework(info)
   File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
line 60, in copy_framework
     destfn = self.appbuilder.copy_framework(info, self.dest)
   File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
line 891, in copy_framework
     self.copy_python_framework(info, dst)
   File
"/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
line 911, in copy_python_framework
     pydir = 'python%d.%d'%(info['version'])
TypeError: int argument required
 >
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py(911)copy_python_framework()
-> pydir = 'python%d.%d'%(info['version'])





--
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@...
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Build python app using wxpython on intel-leopard and deploy on powerpc-tiger?

by Christopher Barker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hari jayaram wrote:
> Just tried a "hello world " app to troubleshoot py2app as Chris Barker
> suggested.
>
> When I say
> open sayhello.app
>
> Nothing happens. No additional console opens . IS this the normal behavior.

yes -- app bundles re-direct stdout to the console, but don't open it
for you. Try opening the console yourself:

/Applications/Utilities/Console.app

clear it, then run your app bundle -- you should see the output.

-Chris


> Here is my hello world style app and its setup.py ( see below)
> Should the app created with py2app automatically open a console?
> Even if I click on the *.app icon..nothing happens.
>
> Hari
>
> ###############
> printto100.py
> ###############
> def main():
>         print "Hello, world!"
>         for i in range(100):
>                 print i
> if __name__ == "__main__":
>        main()
>
> #############
> setup.py
> #############
> """
> This is a setup.py script generated by py2applet
>
> Usage:
>     python setup.py py2app
> """
>
> from setuptools import setup
>
> APP = ['printo100.py']
> DATA_FILES = []
> OPTIONS = {'argv_emulation': True, 'iconfile': './gzilla_ico_fin.icns'}
>
> setup(
>     app=APP,
>     data_files=DATA_FILES,
>     options={'py2app': OPTIONS},
>     setup_requires=['py2app'],
> )
>
>
>
> On Wed, Oct 7, 2009 at 7:28 PM, Christopher Barker
> <Chris.Barker@...> wrote:
>> hari jayaram wrote:
>>> Thanks Chris for your emails..
>> one more thought -- this is looking like it may have nothing to do with
>> wxPython -- try a simple "hello world" script, and see what happens.
>>
>>
>> -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@...
>> _______________________________________________
>> Pythonmac-SIG maillist  -  Pythonmac-SIG@...
>> http://mail.python.org/mailman/listinfo/pythonmac-sig
>>
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@...
> http://mail.python.org/mailman/listinfo/pythonmac-sig


--
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@...
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: Latest Py2app bug..

by Christopher Barker :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Christopher Barker wrote:
> I was trying to help this guy out, and updated by py2app to the dev
> version:
>
> easy_install py2app==dev
>
> Now it's broken for me, on OS-X 10.4, Python.org 2.5:

Another note -- I just cleared it out, and did:

$ easy_install py2app

and got 0.4.2

Still the same bug, even though I'm pretty sure I was running 0.4.2 before.

Is there a way to check the revision number?

-Chris

easy_install output:


Searching for py2app
Reading http://pypi.python.org/simple/py2app/
Reading http://undefined.org/python/#py2app
Best match: py2app 0.4.2
Downloading
http://pypi.python.org/packages/source/p/py2app/py2app-0.4.2.tar.gz#md5=fab793a7e97620afec146e515bbf4e80
Processing py2app-0.4.2.tar.gz
Running py2app-0.4.2/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-SazbDU/py2app-0.4.2/egg-dist-tmp-EtCr4Y
Adding py2app 0.4.2 to easy-install.pth file
Installing py2applet script to
/Library/Frameworks/Python.framework/Versions/2.5/bin

Installed
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg
Processing dependencies for py2app
Finished processing dependencies for py2app




>
> (tested in a very simple "hello world" app, and also one that was
> building fine yesterday, before I did the py2app upgrade.
>
> I suspect this is some simple difference between python or OS-X version
> differences.
>
> -Chris
>
>
> creating
> /Users/cbarker/Junk/dist/printo100.app/Contents/Frameworks/Python.framework/Versions/2.5/Resources
>
> Traceback (most recent call last):
>   File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
> line 589, in _run
>     self.run_normal()
>   File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
> line 660, in run_normal
>     self.create_binaries(py_files, pkgdirs, extensions, loader_files)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
> line 768, in create_binaries
>     mm.mm.run_file(runtime)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/macholib-1.2.1-py2.5.egg/macholib/MachOGraph.py",
> line 62, in run_file
>     m = self.findNode(pathname)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/macholib-1.2.1-py2.5.egg/macholib/MachOGraph.py",
> line 55, in findNode
>     newname = self.locate(name)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/macholib-1.2.1-py2.5.egg/macholib/MachOStandalone.py",
> line 30, in locate
>     return self.delegate.locate(newname)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/macholib-1.2.1-py2.5.egg/macholib/MachOStandalone.py",
> line 69, in locate
>     res = self.copy_framework(info)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
> line 60, in copy_framework
>     destfn = self.appbuilder.copy_framework(info, self.dest)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
> line 891, in copy_framework
>     self.copy_python_framework(info, dst)
>   File
> "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py",
> line 911, in copy_python_framework
>     pydir = 'python%d.%d'%(info['version'])
> TypeError: int argument required
>  >
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/py2app-0.4.2-py2.5.egg/py2app/build_app.py(911)copy_python_framework()
>
> -> pydir = 'python%d.%d'%(info['version'])
>
>
>
>
>


--
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@...
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@...
http://mail.python.org/mailman/listinfo/pythonmac-sig
< Prev | 1 - 2 | Next >