diff options
author | Simon McVittie <smcv@collabora.com> | 2018-01-29 09:43:56 +0000 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2018-01-29 09:43:56 +0000 |
commit | 28098f2c7c23bdef9247c5dfbb8437ca3f03dac4 (patch) | |
tree | f87cbac1f0a97c848f0450b6131350f273c98aa4 | |
parent | 8d0bc022242a89b1d31b2be0aa9e4d570179e3cc (diff) |
Integrate dbus-gmain
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | AUTHORS | 2 | ||||
-rw-r--r-- | COPYING | 9 | ||||
-rw-r--r-- | Makefile.am | 8 | ||||
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | configure.ac | 8 | ||||
-rw-r--r-- | dbus_glib_bindings/module.c | 9 |
7 files changed, 28 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml index c785e24..e827ebb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,7 +37,6 @@ install: dbus gnome-desktop-testing libdbus-1-dev - libdbus-glib-1-dev libtool - > test -z "$dbus_ci_system_python" || sudo apt-get -qq -y install @@ -16,3 +16,5 @@ Zack Rusin <zack@kde.org> Joe Shaw <joe@assbarn.com> Colin Walters <walters@verbum.org> David Zeuthen <david@fubar.dk> + +(See also dbus-gmain/AUTHORS.) @@ -1,6 +1,6 @@ -As of version 0.82.4, dbus-python is released under the following permissive -non-copyleft license (the same one that was proposed for D-Bus core but -wasn't achieved): +As of version 0.82.4, dbus-python itself is released under the following +permissive non-copyleft license (the same one that was proposed for +D-Bus core but wasn't achieved): Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -23,3 +23,6 @@ wasn't achieved): DEALINGS IN THE SOFTWARE. Copyright holders and licensing are indicated in the source files. + +The dbus-gmain/ subdirectory is under a different license: see +dbus-gmain/COPYING for details. diff --git a/Makefile.am b/Makefile.am index d7d8575..13ad510 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,7 @@ installed_test_testdir = ${installed_testdir}/test installed_test_metadir = ${datadir}/installed-tests/${PACKAGE_TARNAME} ACLOCAL_AMFLAGS = -I m4 +SUBDIRS = dbus-gmain . CLEANFILES = \ test/test-service.log \ @@ -42,7 +43,7 @@ AM_CPPFLAGS = \ -include config.h \ -I$(top_srcdir)/include \ $(DBUS_CFLAGS) \ - $(DBUS_GLIB_CFLAGS) \ + $(GLIB_CFLAGS) \ $(PYTHON_CPPFLAGS) \ $(NULL) AM_CFLAGS = \ @@ -123,15 +124,18 @@ _dbus_bindings_la_SOURCES = \ dbus_bindings/validation.c \ $(NULL) +dbus-gmain/libdbus-gmain.la: + $(MAKE) -C dbus-gmain + _dbus_glib_bindings_la_LDFLAGS = \ $(pymod_ldflags) \ -export-symbols-regex \(PyInit__\|init_\)dbus_glib_bindings \ $(AM_LDFLAGS) \ $(NULL) _dbus_glib_bindings_la_LIBADD = \ + dbus-gmain/libdbus-gmain.la \ $(pymod_libadd) \ $(DBUS_LIBS) \ - $(DBUS_GLIB_LIBS) \ $(NULL) _dbus_glib_bindings_la_SOURCES = \ dbus_glib_bindings/module.c \ @@ -11,6 +11,9 @@ Dependencies: • Unit tests now require the dbus-run-session tool from dbus version 1.8 or later. • Most unit tests now require the tap.py module from PyPI. +• The deprecated dbus-glib library is no longer required. A bundled copy + of its main loop integration code is included instead. GLib is still + required for compilation. Enhancements: diff --git a/configure.ac b/configure.ac index 16a0c4b..40754a1 100644 --- a/configure.ac +++ b/configure.ac @@ -187,7 +187,7 @@ AM_CONDITIONAL([ENABLE_API_DOCS], [test "$enable_api_docs" != no]) AM_CONDITIONAL([ENABLE_DOCS], [test "$enable_html_docs" != no]) PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.6]) -PKG_CHECK_MODULES(DBUS_GLIB, [dbus-glib-1 >= 0.70]) +PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.40]) AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS], [], @@ -216,8 +216,14 @@ AC_ARG_ENABLE([coding-style-checks], [ENABLE_CODING_STYLE_CHECKS=$enableval], [ENABLE_CODING_STYLE_CHECKS=$ax_is_release]) +# Make dbus-gmain submodule part of dbus-python's namespace +AH_BOTTOM([ +#define DBUS_GMAIN_FUNCTION_NAME(name) _dbus_py_glib_ ## name +]) + AC_CONFIG_FILES([ Makefile + dbus-gmain/Makefile dbus-python.pc ]) AC_OUTPUT diff --git a/dbus_glib_bindings/module.c b/dbus_glib_bindings/module.c index 1da1ddb..ac05bca 100644 --- a/dbus_glib_bindings/module.c +++ b/dbus_glib_bindings/module.c @@ -25,8 +25,7 @@ #include <Python.h> #include <dbus/dbus-python.h> -#include <dbus/dbus-glib.h> -#include <dbus/dbus-glib-lowlevel.h> +#include <dbus-gmain/dbus-gmain.h> #ifdef PY3 PyMODINIT_FUNC PyInit__dbus_glib_bindings(void); @@ -49,7 +48,7 @@ dbus_py_glib_set_up_conn(DBusConnection *conn, void *data) { GMainContext *ctx = (GMainContext *)data; Py_BEGIN_ALLOW_THREADS - dbus_connection_setup_with_g_main(conn, ctx); + _dbus_py_glib_set_up_connection(conn, ctx); Py_END_ALLOW_THREADS return 1; } @@ -59,7 +58,7 @@ dbus_py_glib_set_up_srv(DBusServer *srv, void *data) { GMainContext *ctx = (GMainContext *)data; Py_BEGIN_ALLOW_THREADS - dbus_server_setup_with_g_main(srv, ctx); + _dbus_py_glib_set_up_server(srv, ctx); Py_END_ALLOW_THREADS return 1; } @@ -161,7 +160,7 @@ PyDoc_STRVAR(gthreads_init__doc__, static PyObject * gthreads_init (PyObject *always_null UNUSED, PyObject *no_args UNUSED) { - dbus_g_thread_init(); + dbus_threads_init_default(); Py_RETURN_NONE; } |