[Pythonmac-SIG] building wxPython on Mac OS X (10.5)

gabriel.rossetti at arimaz.com gabriel.rossetti at arimaz.com
Thu Sep 24 13:28:10 CEST 2009


On 24/9/2009, "gabriel.rossetti at arimaz.com"
<gabriel.rossetti at arimaz.com> wrote:

>On 23/9/2009, "gabriel.rossetti at arimaz.com"
><gabriel.rossetti at arimaz.com> wrote:
>
>>Hello everyone,
>>
>>I am trying to build wx on Mac OS X by following this tutorial :
>>http://www.wxpython.org/BUILD.html
>>
>>I did the following :
>>
>>cd Python-2.5.4
>>mkdir ../Python-Mac-Root
>>/configure --prefix=/Users/me/Desktop/Python-Mac-Root \
>>                --with-suffix=.mine --enable-shared --with-threads
>>make && make install
>>
>>cd ../wxPython-src-2.8.10.1
>>/configure --prefix=/Users/me/Desktop/Python-Mac-Root \
>>                --with-mac --enable-geometry --enable-display \
>>                --enable-unicode --with-libjpeg=builtin \
>>                --with-libpng=builtin --with-libtiff=builtin \
>>                --with-zlib=builtin
>>make && make install
>>
>>cd wxPython
>>/Users/me/Desktop/Python-Mac-Root/bin/python.mine setup.py build_ext \
>>         --inplace BUILD_GLCANVAS=0 BUILD_STC=0 BUILD_GIZMOS=0 \
>>        WX_CONFIG=/Users/me/Desktop/Python-Mac-Root/bin/wx-config
>>
>>and everything goes well. My question is that I don't want to have to
>>set PYTHONPATH and DYLD_LIBRARY_PATH because I'd like for this to be
>>self contained and not have env. variables to set (just unzip and use,
>>like PortablePython on windows). Also, on the wx that's installed with
>>my real python installation I don't have those env variables defined
>>and it still works, so could someone please help me with this?
>>
>>Thank you,
>>Gabriel
>
>
>Ok, I'd forgotten to run the install step so it wasn't in my
>site-packages. :
>
>/Users/grossetti/Desktop/Python-Mac-Root/bin/python.mine setup.py install
>--prefix=/Users/me/Desktop/Python-Mac-Root
>WX_CONFIG=/Users/me/Desktop/Python-Mac-Root/bin/wx-config
>
>I tried to export DYLD_LIBRARY_PATH :
>
>export DYLD_LIBRARY_PATH=/Users/me/Desktop/Python-Mac-Root/lib to see if
>it at least works like that but I get the following error :
>
>$ Desktop/Python-Mac-Root/bin/python.mine
>Python 2.5.4 (r254:67916, Sep 23 2009, 17:37:07)
>[GCC 4.0.1 (Apple Inc. build 5490)] on darwin
>Type "help", "copyright", "credits" or "license" for more
>information.
>>>> import wx
>Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>  File
>"/Users/me/Desktop/Python-Mac-Root/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/__init__.py",
>line 45, in <module>
>    from wx._core import *
>  File
>"/Users/me/Desktop/Python-Mac-Root/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_core.py",
>line 4, in <module>
>    import _core_
>ImportError:
>dlopen(/Users/me/Desktop/Python-Mac-Root/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so,
>2): Symbol not found: __ZN12wxSizerFlags24ReserveSpaceEvenIfHiddenEv
>  Referenced from:
>/Users/me/Desktop/Python-Mac-Root/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so
>  Expected in: dynamic lookup
>
>I don't get it, I did the following :
>
>nm
>/Users/me/Desktop/Python-Mac-Root/lib/python2.5/site-packages/wx-2.8-mac-unicode/wx/_core_.so
>| grep __ZN12wxSizerFlags24ReserveSpaceEvenIfHiddenEv
>         U __ZN12wxSizerFlags24ReserveSpaceEvenIfHiddenEv
>
>so it's there, any ideas?

If I export PYTHONPATH :

export
PYTHONPATH=/Users/me/Desktop/python_client_deps/wxPython-src-2.8.10.1/wxPython

What I don't get is why the installed version doesn't get picked up in
site-packages. It has a wx.path in site-packages :

$ cat /Users/me/Desktop/Python-Mac-Root/lib/python2.5/site-packages/wx.pth
wx-2.8-mac-unicode

so I don't get why it's not getting picked up, any ideas?


More information about the Pythonmac-SIG mailing list