[PyQt] PyQt4 fails to build dbus.mainloop.qt extension with Python 3
Arfrever Frehtes Taifersar Arahesis
arfrever.fta at gmail.com
Fri Jan 27 06:38:49 GMT 2012
dbus-python-1.0.0 was released on 2012-01-24 and introduced support for Python 3.
configure.py of PyQt4 needs to be fixed.
iflags is b'-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -ldbus-1 -lpthread -lrt'
str(iflags) is "b'-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -ldbus-1 -lpthread -lrt'"
str(iflags).split() is ["b'-I/usr/include/dbus-1.0", '-I/usr/lib64/dbus-1.0/include', '-ldbus-1', '-lpthread', "-lrt'"]
--- configure.py
+++ configure.py
@@ -1377,8 +1377,10 @@
sipconfig.inform("DBus v1 does not seem to be installed.")
return
- # Using str() means it will work with both Python v2 and v3.
- for f in str(iflags).split():
+ if sys.hexversion >= 0x03000000:
+ iflags = iflags.decode()
+
+ for f in iflags.split():
if f.startswith("-I"):
dbusincdirs.append(f[2:])
elif f.startswith("-L"):
The following errors occur during compilation:
x86_64-pc-linux-gnu-g++ -c -march=native -O2 -fPIC -Wall -W -D_REENTRANT -DNDEBUG -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/python3.2 -I/usr/mkspecs/linux-g++ -I/usr/include/qt4/QtCore -I/usr/include/qt4 -o dbus.o dbus.cpp
dbus.cpp: In function ‘dbus_bool_t add_watch(DBusWatch*, void*)’:
dbus.cpp:39:14: warning: ‘int dbus_watch_get_fd(DBusWatch*)’ is deprecated (declared at /usr/include/dbus-1.0/dbus/dbus-connection.h:450)
dbus.cpp:39:37: warning: ‘int dbus_watch_get_fd(DBusWatch*)’ is deprecated (declared at /usr/include/dbus-1.0/dbus/dbus-connection.h:450)
dbus.cpp: In function ‘void remove_watch(DBusWatch*, void*)’:
dbus.cpp:72:14: warning: ‘int dbus_watch_get_fd(DBusWatch*)’ is deprecated (declared at /usr/include/dbus-1.0/dbus/dbus-connection.h:450)
dbus.cpp:72:37: warning: ‘int dbus_watch_get_fd(DBusWatch*)’ is deprecated (declared at /usr/include/dbus-1.0/dbus/dbus-connection.h:450)
dbus.cpp: In function ‘void toggle_watch(DBusWatch*, void*)’:
dbus.cpp:104:14: warning: ‘int dbus_watch_get_fd(DBusWatch*)’ is deprecated (declared at /usr/include/dbus-1.0/dbus/dbus-connection.h:450)
dbus.cpp:104:37: warning: ‘int dbus_watch_get_fd(DBusWatch*)’ is deprecated (declared at /usr/include/dbus-1.0/dbus/dbus-connection.h:450)
dbus.cpp: In function ‘PyObject* DBusQtMainLoop(PyObject*, PyObject*, PyObject*)’:
dbus.cpp:344:51: warning: deprecated conversion from string constant to ‘char*’
dbus.cpp: In function ‘PyObject* initqt()’:
dbus.cpp:399:9: error: return-statement with no value, in function returning ‘PyObject*’
dbus.cpp:401:41: error: ‘Py_InitModule’ was not declared in this scope
dbus.cpp:402:1: warning: no return statement in function returning non-void
make[1]: *** [dbus.o] Error 1
--
Arfrever Frehtes Taifersar Arahesis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20120127/67a6aaac/attachment.pgp>
More information about the PyQt
mailing list