[PySide] Building Pyside for Python3 on Mac OS X

60 views
Skip to first unread message

Ludo Visser

unread,
Mar 8, 2012, 5:13:58 AM3/8/12
to pys...@qt-project.org
Hi all,

I'm trying to build PySide for Python 3.2 on Mac OS X using Macports. As of yet, there is no official portfile for PySide for Python 3, so I decided to modify the portfile for the 2.x version. As far as I could figure out, the only modification I had to make with respect to buiding for 2.7 is that Shiboken needs to be built with the USE_PYTHON3 flag set.

Everything builds and installs fine, but I then run into the following problem:

>>>import PySide.QtGui
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/PySide/QtGui.so, 2): Symbol not found: _PyCObject_Type
Referenced from: /opt/local/lib/libshiboken-python2.7.1.1.dylib
Expected in: flat namespace
in /opt/local/lib/libshiboken-python2.7.1.1.dylib

While it makes sense that the libshiboken library for Python 2.7 is not going to work with Python 3.2, I can't figure out why this library is being used in the first place. After building Shiboken, I have this:

$ ls -l /opt/local/lib/libshiboken*
-rwxr-xr-x 1 root admin 212152 Jan 3 04:47 /opt/local/lib/libshiboken-python2.7.1.1.0.dylib
lrwxr-xr-x 1 root admin 33 Jan 3 04:48 /opt/local/lib/libshiboken-python2.7.1.1.dylib -> libshiboken-python2.7.1.1.0.dylib
lrwxr-xr-x 1 root admin 31 Jan 3 04:48 /opt/local/lib/libshiboken-python2.7.dylib -> libshiboken-python2.7.1.1.dylib
-rwxr-xr-x 1 root admin 212152 Mar 3 13:25 /opt/local/lib/libshiboken.cpython-32m.1.1.0.dylib
lrwxr-xr-x 1 root admin 35 Mar 3 13:25 /opt/local/lib/libshiboken.cpython-32m.1.1.dylib -> libshiboken.cpython-32m.1.1.0.dylib
lrwxr-xr-x 1 root admin 33 Mar 3 13:25 /opt/local/lib/libshiboken.cpython-32m.dylib -> libshiboken.cpython-32m.1.1.dylib

It seems I have the library file, but it is not used. Did I miss something while trying to build Shiboken, or something else? Did I miss a configuration step?

Thanks,
Ludo Visser
_______________________________________________
PySide mailing list
PyS...@qt-project.org
http://lists.qt-project.org/mailman/listinfo/pyside

Reply all
Reply to author
Forward
0 new messages