problem building Mac app

I posted this message on the Python-Users list, because of the py2app connection. So far, no clues. Does anyone know of anything in (recent developments within) wxPython that would account for it?

“”"

I’m just coming back to programming after years, trying to recompile an old program that works but needs updating and expansion. I’m now on OS 10.6.8, Python 2.7.2, with wxPython (64/32bit). My newly installed py2app is: py2app-0.6.4-py2.7.egg. All of these were in earlier versions when I last packaged the program with py2app.

In Console, the errors seem to be of two kinds. There’s a long list of ScriptingAdditions messages about missing architectures. Before that, there’s this:

[0x0-0x1bcfbce].org.pythonmac.unspecified.PyProse[87375] NameError: global name ‘self’ is not defined

That seems to be in a module of the program that certainly did work before. I can debug the program in WingIDE, I get no problems or errors (except maybe the ScriptingAdditions ones) when I run it there.

Have I forgotten something simple? Has something changed that I missed?

Thanks for any help.

“”"

···

Charles O. Hartman

Poet in Residence

Lucy Marsh Haskell '19 Professor of Literatures in English

oak.conncoll.edu/cohar

I haven't updated to 0.6.4 yet, but I have built app bundles with 0.6.3 recently. I don't recognize the errors you mention, but I do have some general suggestions that may help you out.

1. Make sure you are using the Python from Python.org, not the one installed by Apple.

2. If you are using a Carbon build of wxPython (which you will be if you are using a 2.8.x release) then you may want to install the version of Python that only has 32-bit architectures in it, so it won't try to run in 64-bit mode by default. (There are no 64-bit Carbon libraries available.) That may be the source of the architecture error messages you are seeing.

3. Setup and use a virtualenv for your project. That makes it easy to install and use the exact libraries that your project needs and not be influenced by old versions of stuff, packages that may be needed by other projects, etc. Using wxPython in a virtualenv can be tricky since it is installed differently that the typical Python package and since it requires being run by a framework aware Python, but there are some notes about how to do it on the wiki: wxPythonVirtualenvOnMac - wxPyWiki

···

On 3/5/12 11:08 AM, Charles Hartman wrote:

I posted this message on the Python-Users list, because of the py2app
connection. So far, no clues. Does anyone know of anything in (recent
developments within) wxPython that would account for it?

"""
I'm just coming back to programming after years, trying to recompile an
old program that works but needs updating and expansion. I'm now on OS
10.6.8, Python 2.7.2, with wxPython (64/32bit). My newly installed
py2app is: py2app-0.6.4-py2.7.egg. All of these were in earlier
versions when I last packaged the program with py2app.

In Console, the errors seem to be of two kinds. There's a long list of
ScriptingAdditions messages about missing architectures. Before that,
there's this:
[0x0-0x1bcfbce].org.pythonmac.unspecified.PyProse[87375]NameError:
global name 'self' is not defined

That seems to be in a module of the program that certainly did work
before. I can debug the program in WingIDE, I get no problems or errors
(except maybe the ScriptingAdditions ones) when I run it there.

Have I forgotten something simple? Has something changed that I missed?

Thanks for any help.
"""

--
Robin Dunn
Software Craftsman