[PyQt] D-Bus include directories detected wrong in PyQt 5.6
Phil Thompson
phil at riverbankcomputing.com
Mon Apr 25 10:51:14 BST 2016
On 25 Apr 2016, at 9:35 am, Dmitry Shachnev <mitya57 at ubuntu.com> wrote:
>
> Hi,
>
> On Debian (and Ubuntu), there are two directories containing D-Bus headers:
>
> $ pkg-config --cflags-only-I dbus-1
> -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include
>
> The latter directory contains dbus-arch-deps.h with arch-specific stuff, the
> former one contains everything else.
>
> PyQt 5.6's configure.py calls that pkg-config command, but only takes those
> directories into account which contain dbus-python.h (= only the first one),
> which results in a build failure because dbus-arch-deps.h is not found.
>
> I have worked that around using the following patch, which is a partial
> revert of 5.5..5.6 diff.
>
> --- a/configure.py
> +++ b/configure.py
> @@ -2140,8 +2140,6 @@ def check_dbus(target_config, verbose):
> else:
> dlist = target_config.dbus_inc_dirs
>
> - target_config.dbus_inc_dirs = []
> -
> for d in dlist:
> if os.access(os.path.join(d, 'dbus', 'dbus-python.h'), os.F_OK):
> if d not in target_config.dbus_inc_dirs:
>
> Also, I believe PyQt can just use qmake's pkg-config integration instead of
> the current custom code. The comment in configure.py says that pkg-config
> for dbus-python is broken, but that seems to no longer be the case.
The reason for the change was to make the behaviour of the --dbus option consistent with others, ie. to replace the default rather than supplement it.
I've (hopefully) fixed it in a different way so that all the directories from pkg-config are included and it checks that dbus/dbus-python.h can be found in one of them.
Phil
More information about the PyQt
mailing list