diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2006-12-18 20:33:56 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2006-12-18 20:33:56 +0000 |
commit | e6eb7b5307da2a446e1c8c6b0cb6b11fc6705b00 (patch) | |
tree | 3315ae510245c0a0b4d791b7c1d73f1bc01afdce | |
parent | 73457d0e435f4a9be9a9980fb06dd004b87c6647 (diff) | |
download | dbus-python-e6eb7b5307da2a446e1c8c6b0cb6b11fc6705b00.tar.gz |
Switch to autotools and test with Python 2.5 as well as 2.4.
In the process:
HACKING.txt: update
include/dbus-python.h: add some typedefs to make it saner
bus.c, conn.c, conn-methods.c: further alter docstrings to keep epydoc happy
exceptions.c: create exceptions in a more longwinded way for Python 2.5 compatibility
message-get-args.c, bus/__init__.py: tweak docstrings
dbus/introspect_parser.py: make docstring valid reStructuredText
run-test.sh: simplify, since configure now does some of the work
test/*.py: use paths from run-test.sh, cope with out-of-tree builds
test-standalone.py: carry out additional sanity checks
31 files changed, 1705 insertions, 230 deletions
@@ -1,12 +1,35 @@ run-with-tmp-session-bus.conf test/data -_dbus_bindings.c -_dbus_glib_bindings.c -_dbus_bindings.pxd ChangeLog -build -dist *.pyc *.pyo .*.sw? -MANIFEST +configure +config.h.in* +autom4te.cache +aclocal.m4 +Makefile.in +autotools/compile +autotools/config.guess +autotools/config.sub +autotools/depcomp +autotools/install-sh +autotools/missing +autotools/py-compile +autotools/ltmain.sh +api +test-service.log +.deps +.libs +*.la +*.lo +config.cache +config.h +config.log +config.status +dbus-python.pc +dbus/_version.py +libtool +stamp-h1 +test/TestSuitePythonService.service +test/tmp-session-bus.conf diff --git a/HACKING.txt b/HACKING.txt index 90679d5..711e958 100644 --- a/HACKING.txt +++ b/HACKING.txt @@ -2,16 +2,43 @@ D-Bus Python bindings - notes for hackers ========================================= -:Author: Simon McVittie -:Date: 2006-09-26 +:Author: Simon McVittie, `Collabora`_ +:Date: 2006-12-18 -Code organisation -================= +.. Collabora: http://www.collabora.co.uk/ -Python wants everything except the init function to be declared static, so the -whole of _dbus_bindings is a single translation unit - module.c #includes -various files *-impl.h, which define static (sometimes static inline) -functions. Even so, it compiles quicker than the old Pyrex implementation :-p +Upstream development +==================== + +dbus-python is developed at freedesktop.org using ``git``. +See `UsingGit`_ for some details. + +.. UsingGit: http://www.freedesktop.org/wiki/UsingGit + +Anonymous access + ``git clone git://anongit.freedesktop.org/git/dbus/dbus-python`` +Committer access (requires freedesktop.org shell account) + ``git clone git+ssh://git.freedesktop.org/git/dbus/dbus-python`` + +Modules +======= + +``dbus``, ``dbus.service`` and ``dbus.mainloop`` are core public API. + +``dbus.lowlevel`` provides a lower-level public API for advanced use. + +``dbus.mainloop.glib`` is the public API for the GLib main loop integration. + +``dbus.types`` and ``dbus.exceptions`` are mainly for backwards +compatibility - use ``dbus`` instead in new code. + +``dbus._dbus``, ``dbus.introspect_parser``, ``dbus.proxies`` are internal +implementation details. + +``_dbus_bindings`` is the real implementation of the Python/libdbus +integration, while ``_dbus_bindings`` is the real implementation of +Python/libdbus-glib integration. Neither is public API, although some +of the classes and functions are exposed as public API in other modules. Threading/locking model ======================= diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index a02c135..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,17 +0,0 @@ -include API_CHANGES.txt -include AUTHORS -include COPYING -include ChangeLog -include HACKING.txt -include MANIFEST.in -include Makefile -include NEWS -include TODO -recursive-include _dbus_bindings *.h *.c -include _dbus_glib_bindings/module.c -recursive-include dbus *.py -recursive-include examples *.py -include include/dbus_bindings.h -include setup.py -recursive-include test *.py *.sh -recursive-include tools *.sh *.conf @@ -1,46 +1,1088 @@ -#!/usr/bin/make -f -# Convenience Makefile for development - distributors and users should use -# setup.py as usual. +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. -default: build +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -warning: - @echo "### If you're not a dbus-python developer, please ignore this" - @echo "### Makefile and use setup.py as usual." +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. -PYTHON ?= python -EPYDOC ?= epydoc -CFLAGS ?= -Wall -Wextra -Werror -Wno-missing-field-initializers \ - -Wdeclaration-after-statement -build: warning - rm -rf build/lib.*/*.so build/temp.* - CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build --debug -quick: warning - CFLAGS="$(CFLAGS)" $(PYTHON) setup.py build --debug +# === Miscellaneous === -check: warning - CFLAGS="$(CFLAGS)" $(PYTHON) setup.py check -# This assumes you've only built for one architecture. -docs: build - cd $(shell echo build/lib.*) && PYTHONPATH=. \ - $(EPYDOC) -o ../epydoc --html --docformat restructuredtext -v \ - dbus _dbus_bindings _dbus_glib_bindings -cross-test-compile: - $(PYTHON) setup.py build --debug +srcdir = . +top_srcdir = . -cross-test-server: - cd $(shell echo build/lib.*) && PYTHONPATH=. \ - PYTHONUNBUFFERED=1 \ - $(PYTHON) ../../test/cross-test-server.py +pkgdatadir = $(datadir)/dbus-python +pkglibdir = $(libdir)/dbus-python +pkgincludedir = $(includedir)/dbus-python +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = /usr/bin/install -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = powerpc-unknown-linux-gnu +host_triplet = powerpc-unknown-linux-gnu +DIST_COMMON = README $(am__configure_deps) $(include_HEADERS) \ + $(nobase_python_PYTHON) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/dbus-python.pc.in $(top_srcdir)/configure \ + $(top_srcdir)/dbus/_version.py.in \ + $(top_srcdir)/test/TestSuitePythonService.service.in \ + $(top_srcdir)/test/tmp-session-bus.conf.in AUTHORS COPYING \ + ChangeLog INSTALL NEWS TODO autotools/compile \ + autotools/config.guess autotools/config.sub autotools/depcomp \ + autotools/install-sh autotools/ltmain.sh autotools/missing \ + autotools/py-compile +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/autotools/jhflags.m4 \ + $(top_srcdir)/autotools/python.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = dbus-python.pc dbus/_version.py \ + test/tmp-session-bus.conf test/TestSuitePythonService.service +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pythondir)" \ + "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" +pyexecLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(pyexec_LTLIBRARIES) +_dbus_bindings_la_LIBADD = +am__dbus_bindings_la_OBJECTS = _dbus_bindings_la-abstract.lo \ + _dbus_bindings_la-bus.lo _dbus_bindings_la-bytes.lo \ + _dbus_bindings_la-conn.lo _dbus_bindings_la-conn-methods.lo \ + _dbus_bindings_la-containers.lo _dbus_bindings_la-debug.lo \ + _dbus_bindings_la-exceptions.lo _dbus_bindings_la-float.lo \ + _dbus_bindings_la-generic.lo _dbus_bindings_la-int.lo \ + _dbus_bindings_la-mainloop.lo \ + _dbus_bindings_la-message-append.lo \ + _dbus_bindings_la-message.lo \ + _dbus_bindings_la-message-get-args.lo \ + _dbus_bindings_la-module.lo _dbus_bindings_la-pending-call.lo \ + _dbus_bindings_la-signature.lo _dbus_bindings_la-string.lo \ + _dbus_bindings_la-validation.lo +_dbus_bindings_la_OBJECTS = $(am__dbus_bindings_la_OBJECTS) +_dbus_glib_bindings_la_LIBADD = +am__dbus_glib_bindings_la_OBJECTS = _dbus_glib_bindings_la-module.lo +_dbus_glib_bindings_la_OBJECTS = $(am__dbus_glib_bindings_la_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I. +depcomp = $(SHELL) $(top_srcdir)/autotools/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ + $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ + $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(_dbus_bindings_la_SOURCES) \ + $(_dbus_glib_bindings_la_SOURCES) +DIST_SOURCES = $(_dbus_bindings_la_SOURCES) \ + $(_dbus_glib_bindings_la_SOURCES) +nobase_pythonPYTHON_INSTALL = $(install_sh_DATA) +py_compile = $(top_srcdir)/autotools/py-compile +pkgconfigDATA_INSTALL = $(INSTALL_DATA) +DATA = $(pkgconfig_DATA) +includeHEADERS_INSTALL = $(INSTALL_HEADER) +HEADERS = $(include_HEADERS) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = ${SHELL} /home/smcv/Collabora/branches/dbus/dbus-python/autotools/missing --run aclocal-1.9 +ACLOCAL_AMFLAGS = -I autotools -I . +AMDEP_FALSE = # +AMDEP_TRUE = +AMTAR = ${SHELL} /home/smcv/Collabora/branches/dbus/dbus-python/autotools/missing --run tar +AR = ar +AUTOCONF = ${SHELL} /home/smcv/Collabora/branches/dbus/dbus-python/autotools/missing --run autoconf +AUTOHEADER = ${SHELL} /home/smcv/Collabora/branches/dbus/dbus-python/autotools/missing --run autoheader +AUTOMAKE = ${SHELL} /home/smcv/Collabora/branches/dbus/dbus-python/autotools/missing --run automake-1.9 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 -Wall -Wextra -Wno-missing-field-initializers -Wdeclaration-after-statement -std=c9x -fno-strict-aliasing +CPP = gcc -E +CPPFLAGS = +CYGPATH_W = echo +DBUS_CFLAGS = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include +DBUS_GLIB_CFLAGS = -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include +DBUS_GLIB_LIBS = -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 +DBUS_LIBS = -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 +DBUS_PYTHON_MAJOR_VERSION = 0 +DBUS_PYTHON_MICRO_VERSION = 93 +DBUS_PYTHON_MINOR_VERSION = 79 +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +ECHO = echo +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = /bin/grep -E +ENABLE_API_DOCS_FALSE = +ENABLE_API_DOCS_TRUE = # +EPYDOC = +EXEEXT = +GREP = /bin/grep +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s +LDFLAGS = +LIBOBJS = +LIBS = +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LN_S = ln -s +LTLIBOBJS = +MAKEINFO = ${SHELL} /home/smcv/Collabora/branches/dbus/dbus-python/autotools/missing --run makeinfo +OBJEXT = o +PACKAGE = dbus-python +PACKAGE_BUGREPORT = http://bugzilla.gnome.org/enter_bug.cgi?product=dbus&component=python +PACKAGE_NAME = dbus-python +PACKAGE_STRING = dbus-python 0.79.93 +PACKAGE_TARNAME = dbus-python +PACKAGE_VERSION = 0.79.93 +PATH_SEPARATOR = : +PKG_CONFIG = /usr/bin/pkg-config +PLATFORM = linux-ppc +PYTHON = /usr/bin/python +PYTHON_EXEC_PREFIX = ${exec_prefix} +PYTHON_INCLUDES = -I/usr/include/python2.4 +PYTHON_PLATFORM = linux2 +PYTHON_PREFIX = ${prefix} +PYTHON_VERSION = 2.4 +RANLIB = ranlib +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 0.79.93 +ac_ct_CC = gcc +am__fastdepCC_FALSE = # +am__fastdepCC_TRUE = +am__include = include +am__leading_dot = . +am__quote = +am__tar = ${AMTAR} chof - "$$tardir" +am__untar = ${AMTAR} xf - +bindir = ${exec_prefix}/bin +build = powerpc-unknown-linux-gnu +build_alias = +build_cpu = powerpc +build_os = linux-gnu +build_vendor = unknown +datadir = ${datarootdir} +datarootdir = ${prefix}/share +docdir = ${datarootdir}/doc/${PACKAGE_TARNAME} +dvidir = ${docdir} +exec_prefix = ${prefix} +host = powerpc-unknown-linux-gnu +host_alias = +host_cpu = powerpc +host_os = linux-gnu +host_vendor = unknown +htmldir = ${docdir} +includedir = ${prefix}/include +infodir = ${datarootdir}/info +install_sh = /home/smcv/Collabora/branches/dbus/dbus-python/autotools/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localedir = ${datarootdir}/locale +localstatedir = ${prefix}/var +mandir = ${datarootdir}/man +mkdir_p = mkdir -p -- +oldincludedir = /usr/include +pdfdir = ${docdir} +pkgpyexecdir = ${pyexecdir}/dbus-python +pkgpythondir = ${pythondir}/dbus-python +prefix = /usr/local +program_transform_name = s,x,x, +psdir = ${docdir} +pyexecdir = ${exec_prefix}/lib/python2.4/site-packages +pythondir = ${prefix}/lib/python2.4/site-packages +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +sysconfdir = ${prefix}/etc +target_alias = +CLEANFILES = +EXTRA_DIST = API_CHANGES.txt dbus-python.pc.in HACKING.txt \ + AUTHORS COPYING ChangeLog NEWS TODO \ + examples/example-client.py \ + examples/example-service.py \ + examples/example-signal-emitter.py \ + examples/example-signal-recipient.py \ + examples/list-system-services.py \ + test/cross-test-client.py \ + test/cross-test-server.py \ + test/crosstest.py \ + test/run-test.sh \ + test/run-with-tmp-session-bus.sh \ + test/test-client.py \ + test/test-service.py \ + test/test-signals.py \ + test/test-standalone.py \ + test/TestSuitePythonService.service.in \ + test/tmp-session-bus.conf.in + +# miss out the gconf examples for now - they don't work +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = dbus-python.pc +include_HEADERS = include/dbus-python.h + +# === Pure Python === +nobase_python_PYTHON = dbus_bindings.py \ + dbus/dbus_bindings.py \ + dbus/_dbus.py \ + dbus/decorators.py \ + dbus/exceptions.py \ + dbus/glib.py \ + dbus/__init__.py \ + dbus/introspect_parser.py \ + dbus/lowlevel.py \ + dbus/mainloop/__init__.py \ + dbus/mainloop/glib.py \ + dbus/proxies.py \ + dbus/service.py \ + dbus/types.py + + +# === Python C extensions === +pyexec_LTLIBRARIES = _dbus_bindings.la _dbus_glib_bindings.la +_dbus_bindings_la_CPPFLAGS = -I$(srcdir)/include \ + $(DBUS_CFLAGS) \ + $(PYTHON_INCLUDES) + +_dbus_bindings_la_LDFLAGS = -module -avoid-version \ + -export-symbols-regex init_dbus_bindings \ + $(DBUS_LIBS) + +_dbus_bindings_la_SOURCES = \ + _dbus_bindings/abstract.c \ + _dbus_bindings/bus.c \ + _dbus_bindings/bytes.c \ + _dbus_bindings/conn.c \ + _dbus_bindings/conn-internal.h \ + _dbus_bindings/conn-methods.c \ + _dbus_bindings/containers.c \ + _dbus_bindings/dbus_bindings-internal.h \ + _dbus_bindings/debug.c \ + _dbus_bindings/exceptions.c \ + _dbus_bindings/float.c \ + _dbus_bindings/generic.c \ + _dbus_bindings/int.c \ + _dbus_bindings/mainloop.c \ + _dbus_bindings/message-append.c \ + _dbus_bindings/message.c \ + _dbus_bindings/message-get-args.c \ + _dbus_bindings/message-internal.h \ + _dbus_bindings/module.c \ + _dbus_bindings/pending-call.c \ + _dbus_bindings/signature.c \ + _dbus_bindings/string.c \ + _dbus_bindings/types-internal.h \ + _dbus_bindings/validation.c \ + include/dbus-python.h + +_dbus_glib_bindings_la_CPPFLAGS = -I$(top_srcdir)/include \ + $(DBUS_CFLAGS) \ + $(DBUS_GLIB_CFLAGS) \ + $(PYTHON_INCLUDES) + +_dbus_glib_bindings_la_LDFLAGS = -module -avoid-version \ + -export-symbols-regex init_dbus_glib_bindings \ + $(DBUS_LIBS) $(DBUS_GLIB_LIBS) + +_dbus_glib_bindings_la_SOURCES = _dbus_glib_bindings/module.c \ + include/dbus-python.h + + +# === Tests === +PWD = `pwd` +TESTS_ENVIRONMENT = DBUS_TOP_SRCDIR="$(PWD)/$(top_srcdir)" \ + DBUS_TOP_BUILDDIR="$(PWD)" \ + DBUS_PYTHON_VERSION='$(PACKAGE_VERSION)' \ + PYTHONPATH="$(PWD)/.libs:$(PWD)/$(top_srcdir):$(PWD)/$(top_srcdir)/test" \ + PYTHON='$(PYTHON)' + +TESTS = test/run-test.sh +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ + cd $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status config.h +$(srcdir)/config.h.in: $(am__configure_deps) + cd $(top_srcdir) && $(AUTOHEADER) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +dbus-python.pc: $(top_builddir)/config.status $(srcdir)/dbus-python.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +dbus/_version.py: $(top_builddir)/config.status $(top_srcdir)/dbus/_version.py.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +test/tmp-session-bus.conf: $(top_builddir)/config.status $(top_srcdir)/test/tmp-session-bus.conf.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +test/TestSuitePythonService.service: $(top_builddir)/config.status $(top_srcdir)/test/TestSuitePythonService.service.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-pyexecLTLIBRARIES: $(pyexec_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pyexecdir)" || $(mkdir_p) "$(DESTDIR)$(pyexecdir)" + @list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \ + if test -f $$p; then \ + f=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=install $(pyexecLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pyexecdir)/$$f'"; \ + $(LIBTOOL) --mode=install $(pyexecLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pyexecdir)/$$f"; \ + else :; fi; \ + done + +uninstall-pyexecLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @set -x; list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \ + p=$(am__strip_dir) \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pyexecdir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pyexecdir)/$$p"; \ + done + +clean-pyexecLTLIBRARIES: + -test -z "$(pyexec_LTLIBRARIES)" || rm -f $(pyexec_LTLIBRARIES) + @list='$(pyexec_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +_dbus_bindings.la: $(_dbus_bindings_la_OBJECTS) $(_dbus_bindings_la_DEPENDENCIES) + $(LINK) -rpath $(pyexecdir) $(_dbus_bindings_la_LDFLAGS) $(_dbus_bindings_la_OBJECTS) $(_dbus_bindings_la_LIBADD) $(LIBS) +_dbus_glib_bindings.la: $(_dbus_glib_bindings_la_OBJECTS) $(_dbus_glib_bindings_la_DEPENDENCIES) + $(LINK) -rpath $(pyexecdir) $(_dbus_glib_bindings_la_LDFLAGS) $(_dbus_glib_bindings_la_OBJECTS) $(_dbus_glib_bindings_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +include ./$(DEPDIR)/_dbus_bindings_la-abstract.Plo +include ./$(DEPDIR)/_dbus_bindings_la-bus.Plo +include ./$(DEPDIR)/_dbus_bindings_la-bytes.Plo +include ./$(DEPDIR)/_dbus_bindings_la-conn-methods.Plo +include ./$(DEPDIR)/_dbus_bindings_la-conn.Plo +include ./$(DEPDIR)/_dbus_bindings_la-containers.Plo +include ./$(DEPDIR)/_dbus_bindings_la-debug.Plo +include ./$(DEPDIR)/_dbus_bindings_la-exceptions.Plo +include ./$(DEPDIR)/_dbus_bindings_la-float.Plo +include ./$(DEPDIR)/_dbus_bindings_la-generic.Plo +include ./$(DEPDIR)/_dbus_bindings_la-int.Plo +include ./$(DEPDIR)/_dbus_bindings_la-mainloop.Plo +include ./$(DEPDIR)/_dbus_bindings_la-message-append.Plo +include ./$(DEPDIR)/_dbus_bindings_la-message-get-args.Plo +include ./$(DEPDIR)/_dbus_bindings_la-message.Plo +include ./$(DEPDIR)/_dbus_bindings_la-module.Plo +include ./$(DEPDIR)/_dbus_bindings_la-pending-call.Plo +include ./$(DEPDIR)/_dbus_bindings_la-signature.Plo +include ./$(DEPDIR)/_dbus_bindings_la-string.Plo +include ./$(DEPDIR)/_dbus_bindings_la-validation.Plo +include ./$(DEPDIR)/_dbus_glib_bindings_la-module.Plo + +.c.o: + if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c $< + +.c.obj: + if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=no \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: + if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ + then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +# source='$<' object='$@' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LTCOMPILE) -c -o $@ $< + +_dbus_bindings_la-abstract.lo: _dbus_bindings/abstract.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-abstract.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-abstract.Tpo" -c -o _dbus_bindings_la-abstract.lo `test -f '_dbus_bindings/abstract.c' || echo '$(srcdir)/'`_dbus_bindings/abstract.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-abstract.Tpo" "$(DEPDIR)/_dbus_bindings_la-abstract.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-abstract.Tpo"; exit 1; fi +# source='_dbus_bindings/abstract.c' object='_dbus_bindings_la-abstract.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-abstract.lo `test -f '_dbus_bindings/abstract.c' || echo '$(srcdir)/'`_dbus_bindings/abstract.c + +_dbus_bindings_la-bus.lo: _dbus_bindings/bus.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-bus.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-bus.Tpo" -c -o _dbus_bindings_la-bus.lo `test -f '_dbus_bindings/bus.c' || echo '$(srcdir)/'`_dbus_bindings/bus.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-bus.Tpo" "$(DEPDIR)/_dbus_bindings_la-bus.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-bus.Tpo"; exit 1; fi +# source='_dbus_bindings/bus.c' object='_dbus_bindings_la-bus.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-bus.lo `test -f '_dbus_bindings/bus.c' || echo '$(srcdir)/'`_dbus_bindings/bus.c + +_dbus_bindings_la-bytes.lo: _dbus_bindings/bytes.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-bytes.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-bytes.Tpo" -c -o _dbus_bindings_la-bytes.lo `test -f '_dbus_bindings/bytes.c' || echo '$(srcdir)/'`_dbus_bindings/bytes.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-bytes.Tpo" "$(DEPDIR)/_dbus_bindings_la-bytes.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-bytes.Tpo"; exit 1; fi +# source='_dbus_bindings/bytes.c' object='_dbus_bindings_la-bytes.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-bytes.lo `test -f '_dbus_bindings/bytes.c' || echo '$(srcdir)/'`_dbus_bindings/bytes.c + +_dbus_bindings_la-conn.lo: _dbus_bindings/conn.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-conn.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-conn.Tpo" -c -o _dbus_bindings_la-conn.lo `test -f '_dbus_bindings/conn.c' || echo '$(srcdir)/'`_dbus_bindings/conn.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-conn.Tpo" "$(DEPDIR)/_dbus_bindings_la-conn.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-conn.Tpo"; exit 1; fi +# source='_dbus_bindings/conn.c' object='_dbus_bindings_la-conn.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-conn.lo `test -f '_dbus_bindings/conn.c' || echo '$(srcdir)/'`_dbus_bindings/conn.c + +_dbus_bindings_la-conn-methods.lo: _dbus_bindings/conn-methods.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-conn-methods.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-conn-methods.Tpo" -c -o _dbus_bindings_la-conn-methods.lo `test -f '_dbus_bindings/conn-methods.c' || echo '$(srcdir)/'`_dbus_bindings/conn-methods.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-conn-methods.Tpo" "$(DEPDIR)/_dbus_bindings_la-conn-methods.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-conn-methods.Tpo"; exit 1; fi +# source='_dbus_bindings/conn-methods.c' object='_dbus_bindings_la-conn-methods.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-conn-methods.lo `test -f '_dbus_bindings/conn-methods.c' || echo '$(srcdir)/'`_dbus_bindings/conn-methods.c + +_dbus_bindings_la-containers.lo: _dbus_bindings/containers.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-containers.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-containers.Tpo" -c -o _dbus_bindings_la-containers.lo `test -f '_dbus_bindings/containers.c' || echo '$(srcdir)/'`_dbus_bindings/containers.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-containers.Tpo" "$(DEPDIR)/_dbus_bindings_la-containers.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-containers.Tpo"; exit 1; fi +# source='_dbus_bindings/containers.c' object='_dbus_bindings_la-containers.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-containers.lo `test -f '_dbus_bindings/containers.c' || echo '$(srcdir)/'`_dbus_bindings/containers.c + +_dbus_bindings_la-debug.lo: _dbus_bindings/debug.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-debug.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-debug.Tpo" -c -o _dbus_bindings_la-debug.lo `test -f '_dbus_bindings/debug.c' || echo '$(srcdir)/'`_dbus_bindings/debug.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-debug.Tpo" "$(DEPDIR)/_dbus_bindings_la-debug.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-debug.Tpo"; exit 1; fi +# source='_dbus_bindings/debug.c' object='_dbus_bindings_la-debug.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-debug.lo `test -f '_dbus_bindings/debug.c' || echo '$(srcdir)/'`_dbus_bindings/debug.c + +_dbus_bindings_la-exceptions.lo: _dbus_bindings/exceptions.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-exceptions.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-exceptions.Tpo" -c -o _dbus_bindings_la-exceptions.lo `test -f '_dbus_bindings/exceptions.c' || echo '$(srcdir)/'`_dbus_bindings/exceptions.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-exceptions.Tpo" "$(DEPDIR)/_dbus_bindings_la-exceptions.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-exceptions.Tpo"; exit 1; fi +# source='_dbus_bindings/exceptions.c' object='_dbus_bindings_la-exceptions.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-exceptions.lo `test -f '_dbus_bindings/exceptions.c' || echo '$(srcdir)/'`_dbus_bindings/exceptions.c + +_dbus_bindings_la-float.lo: _dbus_bindings/float.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-float.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-float.Tpo" -c -o _dbus_bindings_la-float.lo `test -f '_dbus_bindings/float.c' || echo '$(srcdir)/'`_dbus_bindings/float.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-float.Tpo" "$(DEPDIR)/_dbus_bindings_la-float.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-float.Tpo"; exit 1; fi +# source='_dbus_bindings/float.c' object='_dbus_bindings_la-float.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-float.lo `test -f '_dbus_bindings/float.c' || echo '$(srcdir)/'`_dbus_bindings/float.c + +_dbus_bindings_la-generic.lo: _dbus_bindings/generic.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-generic.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-generic.Tpo" -c -o _dbus_bindings_la-generic.lo `test -f '_dbus_bindings/generic.c' || echo '$(srcdir)/'`_dbus_bindings/generic.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-generic.Tpo" "$(DEPDIR)/_dbus_bindings_la-generic.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-generic.Tpo"; exit 1; fi +# source='_dbus_bindings/generic.c' object='_dbus_bindings_la-generic.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-generic.lo `test -f '_dbus_bindings/generic.c' || echo '$(srcdir)/'`_dbus_bindings/generic.c + +_dbus_bindings_la-int.lo: _dbus_bindings/int.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-int.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-int.Tpo" -c -o _dbus_bindings_la-int.lo `test -f '_dbus_bindings/int.c' || echo '$(srcdir)/'`_dbus_bindings/int.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-int.Tpo" "$(DEPDIR)/_dbus_bindings_la-int.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-int.Tpo"; exit 1; fi +# source='_dbus_bindings/int.c' object='_dbus_bindings_la-int.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-int.lo `test -f '_dbus_bindings/int.c' || echo '$(srcdir)/'`_dbus_bindings/int.c + +_dbus_bindings_la-mainloop.lo: _dbus_bindings/mainloop.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-mainloop.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-mainloop.Tpo" -c -o _dbus_bindings_la-mainloop.lo `test -f '_dbus_bindings/mainloop.c' || echo '$(srcdir)/'`_dbus_bindings/mainloop.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-mainloop.Tpo" "$(DEPDIR)/_dbus_bindings_la-mainloop.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-mainloop.Tpo"; exit 1; fi +# source='_dbus_bindings/mainloop.c' object='_dbus_bindings_la-mainloop.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-mainloop.lo `test -f '_dbus_bindings/mainloop.c' || echo '$(srcdir)/'`_dbus_bindings/mainloop.c + +_dbus_bindings_la-message-append.lo: _dbus_bindings/message-append.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-message-append.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-message-append.Tpo" -c -o _dbus_bindings_la-message-append.lo `test -f '_dbus_bindings/message-append.c' || echo '$(srcdir)/'`_dbus_bindings/message-append.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-message-append.Tpo" "$(DEPDIR)/_dbus_bindings_la-message-append.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-message-append.Tpo"; exit 1; fi +# source='_dbus_bindings/message-append.c' object='_dbus_bindings_la-message-append.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-message-append.lo `test -f '_dbus_bindings/message-append.c' || echo '$(srcdir)/'`_dbus_bindings/message-append.c + +_dbus_bindings_la-message.lo: _dbus_bindings/message.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-message.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-message.Tpo" -c -o _dbus_bindings_la-message.lo `test -f '_dbus_bindings/message.c' || echo '$(srcdir)/'`_dbus_bindings/message.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-message.Tpo" "$(DEPDIR)/_dbus_bindings_la-message.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-message.Tpo"; exit 1; fi +# source='_dbus_bindings/message.c' object='_dbus_bindings_la-message.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-message.lo `test -f '_dbus_bindings/message.c' || echo '$(srcdir)/'`_dbus_bindings/message.c + +_dbus_bindings_la-message-get-args.lo: _dbus_bindings/message-get-args.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-message-get-args.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-message-get-args.Tpo" -c -o _dbus_bindings_la-message-get-args.lo `test -f '_dbus_bindings/message-get-args.c' || echo '$(srcdir)/'`_dbus_bindings/message-get-args.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-message-get-args.Tpo" "$(DEPDIR)/_dbus_bindings_la-message-get-args.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-message-get-args.Tpo"; exit 1; fi +# source='_dbus_bindings/message-get-args.c' object='_dbus_bindings_la-message-get-args.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-message-get-args.lo `test -f '_dbus_bindings/message-get-args.c' || echo '$(srcdir)/'`_dbus_bindings/message-get-args.c + +_dbus_bindings_la-module.lo: _dbus_bindings/module.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-module.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-module.Tpo" -c -o _dbus_bindings_la-module.lo `test -f '_dbus_bindings/module.c' || echo '$(srcdir)/'`_dbus_bindings/module.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-module.Tpo" "$(DEPDIR)/_dbus_bindings_la-module.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-module.Tpo"; exit 1; fi +# source='_dbus_bindings/module.c' object='_dbus_bindings_la-module.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-module.lo `test -f '_dbus_bindings/module.c' || echo '$(srcdir)/'`_dbus_bindings/module.c + +_dbus_bindings_la-pending-call.lo: _dbus_bindings/pending-call.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-pending-call.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-pending-call.Tpo" -c -o _dbus_bindings_la-pending-call.lo `test -f '_dbus_bindings/pending-call.c' || echo '$(srcdir)/'`_dbus_bindings/pending-call.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-pending-call.Tpo" "$(DEPDIR)/_dbus_bindings_la-pending-call.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-pending-call.Tpo"; exit 1; fi +# source='_dbus_bindings/pending-call.c' object='_dbus_bindings_la-pending-call.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-pending-call.lo `test -f '_dbus_bindings/pending-call.c' || echo '$(srcdir)/'`_dbus_bindings/pending-call.c + +_dbus_bindings_la-signature.lo: _dbus_bindings/signature.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-signature.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-signature.Tpo" -c -o _dbus_bindings_la-signature.lo `test -f '_dbus_bindings/signature.c' || echo '$(srcdir)/'`_dbus_bindings/signature.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-signature.Tpo" "$(DEPDIR)/_dbus_bindings_la-signature.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-signature.Tpo"; exit 1; fi +# source='_dbus_bindings/signature.c' object='_dbus_bindings_la-signature.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-signature.lo `test -f '_dbus_bindings/signature.c' || echo '$(srcdir)/'`_dbus_bindings/signature.c + +_dbus_bindings_la-string.lo: _dbus_bindings/string.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-string.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-string.Tpo" -c -o _dbus_bindings_la-string.lo `test -f '_dbus_bindings/string.c' || echo '$(srcdir)/'`_dbus_bindings/string.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-string.Tpo" "$(DEPDIR)/_dbus_bindings_la-string.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-string.Tpo"; exit 1; fi +# source='_dbus_bindings/string.c' object='_dbus_bindings_la-string.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-string.lo `test -f '_dbus_bindings/string.c' || echo '$(srcdir)/'`_dbus_bindings/string.c + +_dbus_bindings_la-validation.lo: _dbus_bindings/validation.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_bindings_la-validation.lo -MD -MP -MF "$(DEPDIR)/_dbus_bindings_la-validation.Tpo" -c -o _dbus_bindings_la-validation.lo `test -f '_dbus_bindings/validation.c' || echo '$(srcdir)/'`_dbus_bindings/validation.c; \ + then mv -f "$(DEPDIR)/_dbus_bindings_la-validation.Tpo" "$(DEPDIR)/_dbus_bindings_la-validation.Plo"; else rm -f "$(DEPDIR)/_dbus_bindings_la-validation.Tpo"; exit 1; fi +# source='_dbus_bindings/validation.c' object='_dbus_bindings_la-validation.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_bindings_la-validation.lo `test -f '_dbus_bindings/validation.c' || echo '$(srcdir)/'`_dbus_bindings/validation.c + +_dbus_glib_bindings_la-module.lo: _dbus_glib_bindings/module.c + if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_glib_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT _dbus_glib_bindings_la-module.lo -MD -MP -MF "$(DEPDIR)/_dbus_glib_bindings_la-module.Tpo" -c -o _dbus_glib_bindings_la-module.lo `test -f '_dbus_glib_bindings/module.c' || echo '$(srcdir)/'`_dbus_glib_bindings/module.c; \ + then mv -f "$(DEPDIR)/_dbus_glib_bindings_la-module.Tpo" "$(DEPDIR)/_dbus_glib_bindings_la-module.Plo"; else rm -f "$(DEPDIR)/_dbus_glib_bindings_la-module.Tpo"; exit 1; fi +# source='_dbus_glib_bindings/module.c' object='_dbus_glib_bindings_la-module.lo' libtool=yes \ +# DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) \ +# $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(_dbus_glib_bindings_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o _dbus_glib_bindings_la-module.lo `test -f '_dbus_glib_bindings/module.c' || echo '$(srcdir)/'`_dbus_glib_bindings/module.c + +mostlyclean-libtool: + -rm -f *.lo +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-nobase_pythonPYTHON: $(nobase_python_PYTHON) + @$(NORMAL_INSTALL) + test -z "$(pythondir)" || $(mkdir_p) "$(DESTDIR)$(pythondir)" + @$(am__vpath_adj_setup) \ + list='$(nobase_python_PYTHON)'; dlist=''; for p in $$list; do\ + if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ + if test -f $$b$$p; then \ + $(am__vpath_adj) \ + dlist="$$dlist $$f"; \ + echo " $(nobase_pythonPYTHON_INSTALL) '$$b$$p' '$(DESTDIR)$(pythondir)/$$f'"; \ + $(nobase_pythonPYTHON_INSTALL) "$$b$$p" "$(DESTDIR)$(pythondir)/$$f"; \ + else :; fi; \ + done; \ + if test -n "$$dlist"; then \ + if test -z "$(DESTDIR)"; then \ + PYTHON=$(PYTHON) $(py_compile) --basedir "$(pythondir)" $$dlist; \ + else \ + PYTHON=$(PYTHON) $(py_compile) --destdir "$(DESTDIR)" --basedir "$(pythondir)" $$dlist; \ + fi; \ + else :; fi + +uninstall-nobase_pythonPYTHON: + @$(NORMAL_UNINSTALL) + @$(am__vpath_adj_setup) \ + list='$(nobase_python_PYTHON)'; dlist=''; for p in $$list; do\ + $(am__vpath_adj) \ + rm -f "$(DESTDIR)$(pythondir)/$$f"; \ + rm -f "$(DESTDIR)$(pythondir)/$${f}c"; \ + rm -f "$(DESTDIR)$(pythondir)/$${f}o"; \ + done +install-pkgconfigDATA: $(pkgconfig_DATA) + @$(NORMAL_INSTALL) + test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done + +uninstall-pkgconfigDATA: + @$(NORMAL_UNINSTALL) + @list='$(pkgconfig_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ + done +install-includeHEADERS: $(include_HEADERS) + @$(NORMAL_INSTALL) + test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" + @list='$(include_HEADERS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ + $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ + done + +uninstall-includeHEADERS: + @$(NORMAL_UNINSTALL) + @list='$(include_HEADERS)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ + rm -f "$(DESTDIR)$(includedir)/$$f"; \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +check-TESTS: $(TESTS) + @failed=0; all=0; xfail=0; xpass=0; skip=0; \ + srcdir=$(srcdir); export srcdir; \ + list='$(TESTS)'; \ + if test -n "$$list"; then \ + for tst in $$list; do \ + if test -f ./$$tst; then dir=./; \ + elif test -f $$tst; then dir=; \ + else dir="$(srcdir)/"; fi; \ + if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *" $$tst "*) \ + xpass=`expr $$xpass + 1`; \ + failed=`expr $$failed + 1`; \ + echo "XPASS: $$tst"; \ + ;; \ + *) \ + echo "PASS: $$tst"; \ + ;; \ + esac; \ + elif test $$? -ne 77; then \ + all=`expr $$all + 1`; \ + case " $(XFAIL_TESTS) " in \ + *" $$tst "*) \ + xfail=`expr $$xfail + 1`; \ + echo "XFAIL: $$tst"; \ + ;; \ + *) \ + failed=`expr $$failed + 1`; \ + echo "FAIL: $$tst"; \ + ;; \ + esac; \ + else \ + skip=`expr $$skip + 1`; \ + echo "SKIP: $$tst"; \ + fi; \ + done; \ + if test "$$failed" -eq 0; then \ + if test "$$xfail" -eq 0; then \ + banner="All $$all tests passed"; \ + else \ + banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ + fi; \ + else \ + if test "$$xpass" -eq 0; then \ + banner="$$failed of $$all tests failed"; \ + else \ + banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ + fi; \ + fi; \ + dashes="$$banner"; \ + skipped=""; \ + if test "$$skip" -ne 0; then \ + skipped="($$skip tests were not run)"; \ + test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$skipped"; \ + fi; \ + report=""; \ + if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ + report="Please report to $(PACKAGE_BUGREPORT)"; \ + test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ + dashes="$$report"; \ + fi; \ + dashes=`echo "$$dashes" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + test -z "$$skipped" || echo "$$skipped"; \ + test -z "$$report" || echo "$$report"; \ + echo "$$dashes"; \ + test "$$failed" -eq 0; \ + else :; fi + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + $(mkdir_p) $(distdir)/. $(distdir)/autotools $(distdir)/dbus $(distdir)/dbus/mainloop $(distdir)/examples $(distdir)/include $(distdir)/test + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am + $(MAKE) $(AM_MAKEFLAGS) check-TESTS +check: check-am +all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h +installdirs: + for dir in "$(DESTDIR)$(pyexecdir)" "$(DESTDIR)$(pythondir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pyexecLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-includeHEADERS install-nobase_pythonPYTHON \ + install-pkgconfigDATA + +install-exec-am: install-pyexecLTLIBRARIES + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-includeHEADERS uninstall-info-am \ + uninstall-nobase_pythonPYTHON uninstall-pkgconfigDATA \ + uninstall-pyexecLTLIBRARIES + +.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \ + clean clean-generic clean-libtool clean-pyexecLTLIBRARIES \ + ctags dist dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ \ + dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-libtool \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-exec install-exec-am \ + install-includeHEADERS install-info install-info-am \ + install-man install-nobase_pythonPYTHON install-pkgconfigDATA \ + install-pyexecLTLIBRARIES install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-includeHEADERS \ + uninstall-info-am uninstall-nobase_pythonPYTHON \ + uninstall-pkgconfigDATA uninstall-pyexecLTLIBRARIES + + +cross-test-compile: all +cross-test-server: + $(TESTS_ENVIRONMENT) $(PYTHON) test/cross-test-server.py cross-test-client: - cd $(shell echo build/lib.*) && PYTHONPATH=. \ - PYTHONUNBUFFERED=1 \ - $(PYTHON) ../../test/cross-test-client.py + $(TESTS_ENVIRONMENT) $(PYTHON) test/cross-test-client.py + +# === Documentation === + +#all: api/index.html + +#api api/index.html: $(nobase_python_PYTHON) _dbus_bindings.la _dbus_glib_bindings.la +# rm -rf api +# mkdir api +# $(TESTS_ENVIRONMENT) $(EPYDOC) -o api --html \ +# --docformat restructuredtext -v \ +# `echo $(nobase_python_PYTHON) \ +# | sed -e 's#/__init__\.py##g' \ +# -e 's/\.py\>//g' -e 's#/#.#'g` \ +# || { rm -rf api; exit 1; } -.PHONY: default docs warning .PHONY: cross-test-compile cross-test-server cross-test-client +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..0e98529 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,124 @@ +# === Miscellaneous === + +CLEANFILES = +EXTRA_DIST = API_CHANGES.txt dbus-python.pc.in HACKING.txt \ + AUTHORS COPYING ChangeLog NEWS TODO \ + examples/example-client.py \ + examples/example-service.py \ + examples/example-signal-emitter.py \ + examples/example-signal-recipient.py \ + examples/list-system-services.py \ + test/cross-test-client.py \ + test/cross-test-server.py \ + test/crosstest.py \ + test/run-test.sh \ + test/run-with-tmp-session-bus.sh \ + test/test-client.py \ + test/test-service.py \ + test/test-signals.py \ + test/test-standalone.py \ + test/TestSuitePythonService.service.in \ + test/tmp-session-bus.conf.in +# miss out the gconf examples for now - they don't work + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = dbus-python.pc + +include_HEADERS = include/dbus-python.h + +# === Pure Python === + +nobase_python_PYTHON = dbus_bindings.py \ + dbus/dbus_bindings.py \ + dbus/_dbus.py \ + dbus/decorators.py \ + dbus/exceptions.py \ + dbus/glib.py \ + dbus/__init__.py \ + dbus/introspect_parser.py \ + dbus/lowlevel.py \ + dbus/mainloop/__init__.py \ + dbus/mainloop/glib.py \ + dbus/proxies.py \ + dbus/service.py \ + dbus/types.py + +# === Python C extensions === + +pyexec_LTLIBRARIES = _dbus_bindings.la _dbus_glib_bindings.la +_dbus_bindings_la_CPPFLAGS = -I$(srcdir)/include \ + $(DBUS_CFLAGS) \ + $(PYTHON_INCLUDES) +_dbus_bindings_la_LDFLAGS = -module -avoid-version \ + -export-symbols-regex init_dbus_bindings \ + $(DBUS_LIBS) +_dbus_bindings_la_SOURCES = \ + _dbus_bindings/abstract.c \ + _dbus_bindings/bus.c \ + _dbus_bindings/bytes.c \ + _dbus_bindings/conn.c \ + _dbus_bindings/conn-internal.h \ + _dbus_bindings/conn-methods.c \ + _dbus_bindings/containers.c \ + _dbus_bindings/dbus_bindings-internal.h \ + _dbus_bindings/debug.c \ + _dbus_bindings/exceptions.c \ + _dbus_bindings/float.c \ + _dbus_bindings/generic.c \ + _dbus_bindings/int.c \ + _dbus_bindings/mainloop.c \ + _dbus_bindings/message-append.c \ + _dbus_bindings/message.c \ + _dbus_bindings/message-get-args.c \ + _dbus_bindings/message-internal.h \ + _dbus_bindings/module.c \ + _dbus_bindings/pending-call.c \ + _dbus_bindings/signature.c \ + _dbus_bindings/string.c \ + _dbus_bindings/types-internal.h \ + _dbus_bindings/validation.c \ + include/dbus-python.h + +_dbus_glib_bindings_la_CPPFLAGS = -I$(top_srcdir)/include \ + $(DBUS_CFLAGS) \ + $(DBUS_GLIB_CFLAGS) \ + $(PYTHON_INCLUDES) +_dbus_glib_bindings_la_LDFLAGS = -module -avoid-version \ + -export-symbols-regex init_dbus_glib_bindings \ + $(DBUS_LIBS) $(DBUS_GLIB_LIBS) +_dbus_glib_bindings_la_SOURCES = _dbus_glib_bindings/module.c \ + include/dbus-python.h + +# === Tests === + +PWD = `pwd` +TESTS_ENVIRONMENT = DBUS_TOP_SRCDIR="$(PWD)/$(top_srcdir)" \ + DBUS_TOP_BUILDDIR="$(PWD)" \ + DBUS_PYTHON_VERSION='$(PACKAGE_VERSION)' \ + PYTHONPATH="$(PWD)/.libs:$(PWD)/$(top_srcdir):$(PWD)/$(top_srcdir)/test" \ + PYTHON='$(PYTHON)' +TESTS = test/run-test.sh + +cross-test-compile: all +cross-test-server: + $(TESTS_ENVIRONMENT) $(PYTHON) test/cross-test-server.py +cross-test-client: + $(TESTS_ENVIRONMENT) $(PYTHON) test/cross-test-client.py + +# === Documentation === + +if ENABLE_API_DOCS +all: api/index.html + +api api/index.html: $(nobase_python_PYTHON) _dbus_bindings.la _dbus_glib_bindings.la + rm -rf api + mkdir api + $(TESTS_ENVIRONMENT) $(EPYDOC) -o api --html \ + --docformat restructuredtext -v \ + `echo $(nobase_python_PYTHON) \ + | sed -e 's#/__init__\.py##g' \ + -e 's/\.py\>//g' -e 's#/#.#'g` \ + || { rm -rf api; exit 1; } +endif + +.PHONY: cross-test-compile cross-test-server cross-test-client @@ -0,0 +1,33 @@ +====================================== +dbus-python: Python bindings for D-Bus +====================================== + +:Author: Simon McVittie, `Collabora`_ +:Date: 2006-12-18 + +.. Collabora: http://www.collabora.co.uk/ + +Usage +===== + +For client code, see the docstring for dbus/__init__.py. + +To export objects, see the docstring for dbus/service.py. + +To develop on dbus-python, see HACKING.txt. + +Building the API documentation +============================== + +Because the API documentation is generated with a pre-release version of +epydoc, it's not currently built by default. To do so, install +`epydoc`_ 3 alpha and `docutils`_, and run ``./configure`` with the +``--enable-api-docs`` option. Documentation starts from ``api/index.html``. + +.. epydoc: http://epydoc.sourceforge.net/ +.. python-docutils: http://docutils.sourceforge.net/ + +For now, a copy of the documentation (updated for each release candidate) +can be found here: `dbus-python API documentation on people.freedesktop.org`__ + +__ http://people.freedesktop.org/~smcv/dbus-python-0.8pre/epydoc/ diff --git a/_dbus_bindings/bus.c b/_dbus_bindings/bus.c index 1b0fc91..c31d2c6 100644 --- a/_dbus_bindings/bus.c +++ b/_dbus_bindings/bus.c @@ -161,7 +161,7 @@ Bus_get_unix_user(Connection *self, PyObject *args) } PyDoc_STRVAR(Bus_start_service_by_name__doc__, -"start_service_by_name(bus_name) -> (True, int)\n\ +"start_service_by_name(bus_name)\n\ \n\ Start a service which will implement the given bus name on this\n\ Bus.\n\ diff --git a/_dbus_bindings/conn-methods.c b/_dbus_bindings/conn-methods.c index 10084e2..4ae5608 100644 --- a/_dbus_bindings/conn-methods.c +++ b/_dbus_bindings/conn-methods.c @@ -317,7 +317,8 @@ Connection_send_message(Connection *self, PyObject *args) PyDoc_STRVAR(Connection_send_message_with_reply__doc__, "send_message_with_reply(msg, reply_handler, timeout_s=-1)" " -> dbus.lowlevel.PendingCall\n\n" -"Queue the message for sending; expect a reply via the returned PendingCall.\n" +"Queue the message for sending; expect a reply via the returned PendingCall,\n" +"which can also be used to cancel the pending call.\n" "\n" ":Parameters:\n" " `msg` : dbus.lowlevel.Message\n" @@ -329,8 +330,6 @@ PyDoc_STRVAR(Connection_send_message_with_reply__doc__, " If the reply takes more than this many seconds, a timeout error\n" " will be created locally and raised instead. If this timeout is\n" " negative (default), a sane default (supplied by libdbus) is used.\n" -":Returns:\n" -" A `dbus.lowlevel.PendingCall` instance which can be used to cancel the pending call.\n" "\n" ); static PyObject * diff --git a/_dbus_bindings/conn.c b/_dbus_bindings/conn.c index 5fd6404..2b5faed 100644 --- a/_dbus_bindings/conn.c +++ b/_dbus_bindings/conn.c @@ -29,8 +29,10 @@ /* Connection definition ============================================ */ PyDoc_STRVAR(Connection_tp_doc, -"A D-Bus connection.\n\n" +"A D-Bus connection.\n" +"\n" "::\n" +"\n" " Connection(address, mainloop=None) -> Connection\n" ); diff --git a/_dbus_bindings/exceptions.c b/_dbus_bindings/exceptions.c index ffe8fe9..efa3df2 100644 --- a/_dbus_bindings/exceptions.c +++ b/_dbus_bindings/exceptions.c @@ -31,7 +31,8 @@ PyDoc_STRVAR(DBusException__doc__, "Represents any D-Bus-related error."); PyObject * DBusPyException_ConsumeError(DBusError *error) { - PyErr_Format(DBusPyException, "%s: %s", error->name, error->message); + PyErr_Format(DBusPyException, "%s: %s", + error->name, error->message); dbus_error_free(error); return NULL; } @@ -39,16 +40,34 @@ DBusPyException_ConsumeError(DBusError *error) dbus_bool_t dbus_py_init_exception_types(void) { - PyObject *docstring; + PyObject *bases; + PyObject *dict = PyDict_New(); + PyObject *name; - /* We call it dbus.DBusException because that's where you should import it - from. */ - DBusPyException = PyErr_NewException("dbus.DBusException", NULL, NULL); - if (!DBusPyException) return 0; - docstring = PyString_FromString(DBusException__doc__); - if (!docstring) return 0; - if (PyObject_SetAttrString(DBusPyException, "__doc__", docstring)) return 0; - Py_DECREF(docstring); + if (!dict) + return 0; + if (PyDict_SetItemString(dict, "__doc__", + PyString_FromString(DBusException__doc__)) < 0) + return 0; + if (PyDict_SetItemString(dict, "__module__", + PyString_FromString("dbus")) < 0) + return 0; + bases = Py_BuildValue("(O)", (PyObject *)PyExc_Exception); + if (!bases) { + Py_DECREF(dict); + return 0; + } + name = PyString_FromString("DBusException"); + if (!name) { + Py_DECREF(dict); + Py_DECREF(bases); + return 0; + } + DBusPyException = PyClass_New(bases, dict, name); + Py_DECREF(bases); + Py_DECREF(dict); + if (!DBusPyException) + return 0; return 1; } diff --git a/_dbus_bindings/message-get-args.c b/_dbus_bindings/message-get-args.c index abe03b8..585b4cb 100644 --- a/_dbus_bindings/message-get-args.c +++ b/_dbus_bindings/message-get-args.c @@ -32,12 +32,13 @@ char dbus_py_Message_get_args_list__doc__[] = ( "Return the message's arguments. Keyword arguments control the translation\n" "of D-Bus types to Python:\n" "\n" -":Parameters:\n" +":Keywords:\n" " `byte_arrays` : bool\n" " If true, convert arrays of byte (signature 'ay') into ByteArray,\n" -" a str subclass whose subscript operator returns Byte objects.\n" -" If false (default), convert them like any other array (into a\n" -" list of Bytes, or a list of ints if integer_bytes is true)." +" a str subclass. In practice, this is usually what you want, but\n" +" it's off by default for consistency.\n" +"\n" +" If false (default), convert them into a dbus.Array of Bytes.\n" " `utf8_strings` : bool\n" " If true, return D-Bus strings as Python 8-bit strings (of UTF-8).\n" " If false (default), return D-Bus strings as Python unicode objects.\n" diff --git a/_dbus_bindings/module.c b/_dbus_bindings/module.c index 3e0e932..616579c 100644 --- a/_dbus_bindings/module.c +++ b/_dbus_bindings/module.c @@ -21,6 +21,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ +#include "config.h" #include <Python.h> #include <structmember.h> @@ -237,11 +238,11 @@ init_dbus_bindings(void) { PyObject *this_module, *c_api; static const int API_count = DBUS_BINDINGS_API_COUNT; - static void *dbus_bindings_API[DBUS_BINDINGS_API_COUNT]; + static _dbus_py_func_ptr dbus_bindings_API[DBUS_BINDINGS_API_COUNT]; - dbus_bindings_API[0] = (void *)&API_count; - dbus_bindings_API[1] = (void *)Connection_BorrowDBusConnection; - dbus_bindings_API[2] = (void *)NativeMainLoop_New4; + dbus_bindings_API[0] = (_dbus_py_func_ptr)&API_count; + dbus_bindings_API[1] = (_dbus_py_func_ptr)DBusPyConnection_BorrowDBusConnection; + dbus_bindings_API[2] = (_dbus_py_func_ptr)DBusPyNativeMainLoop_New4; default_main_loop = NULL; @@ -354,6 +355,12 @@ init_dbus_bindings(void) if (PyModule_AddStringConstant(this_module, "__docformat__", "restructuredtext") < 0) return; + if (PyModule_AddStringConstant(this_module, "__version__", + PACKAGE_VERSION) < 0) return; + + if (PyModule_AddIntConstant(this_module, "_python_version", + PY_VERSION_HEX) < 0) return; + c_api = PyCObject_FromVoidPtr ((void *)dbus_bindings_API, NULL); if (!c_api) { return; diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..57c617c --- /dev/null +++ b/autogen.sh @@ -0,0 +1,5 @@ +#!/bin/sh +if test -z "$ACLOCAL"; then + ACLOCAL="aclocal" +fi +ACLOCAL="$ACLOCAL -I autotools" autoreconf -f -i diff --git a/autotools/as-ac-expand.m4 b/autotools/as-ac-expand.m4 new file mode 100644 index 0000000..0c71173 --- /dev/null +++ b/autotools/as-ac-expand.m4 @@ -0,0 +1,40 @@ +dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR) +dnl +dnl example +dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir) +dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local + +AC_DEFUN([AS_AC_EXPAND], +[ + EXP_VAR=[$1] + FROM_VAR=[$2] + + dnl first expand prefix and exec_prefix if necessary + prefix_save=$prefix + exec_prefix_save=$exec_prefix + + dnl if no prefix given, then use /usr/local, the default prefix + if test "x$prefix" = "xNONE"; then + prefix=$ac_default_prefix + fi + dnl if no exec_prefix given, then use prefix + if test "x$exec_prefix" = "xNONE"; then + exec_prefix=$prefix + fi + + full_var="$FROM_VAR" + dnl loop until it doesn't change anymore + while true; do + new_full_var="`eval echo $full_var`" + if test "x$new_full_var"="x$full_var"; then break; fi + full_var=$new_full_var + done + + dnl clean up + full_var=$new_full_var + AC_SUBST([$1], "$full_var") + + dnl restore prefix and exec_prefix + prefix=$prefix_save + exec_prefix=$exec_prefix_save +]) diff --git a/autotools/jhflags.m4 b/autotools/jhflags.m4 new file mode 100644 index 0000000..222e4b0 --- /dev/null +++ b/autotools/jhflags.m4 @@ -0,0 +1,21 @@ +dnl +dnl JH_ADD_CFLAG(FLAG) +dnl checks whether the C compiler supports the given flag, and if so, adds +dnl it to $CFLAGS. If the flag is already present in the list, then the +dnl check is not performed. +AC_DEFUN([JH_ADD_CFLAG], +[ +case " $CFLAGS " in +*@<:@\ \ @:>@$1@<:@\ \ @:>@*) + ;; +*) + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $1" + AC_MSG_CHECKING([whether [$]CC understands $1]) + AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no]) + AC_MSG_RESULT($jh_has_option) + if test $jh_has_option = no; then + CFLAGS="$save_CFLAGS" + fi + ;; +esac]) diff --git a/autotools/python.m4 b/autotools/python.m4 new file mode 100644 index 0000000..e1c5266 --- /dev/null +++ b/autotools/python.m4 @@ -0,0 +1,62 @@ +## this one is commonly used with AM_PATH_PYTHONDIR ... +dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) +dnl Check if a module containing a given symbol is visible to python. +AC_DEFUN([AM_CHECK_PYMOD], +[AC_REQUIRE([AM_PATH_PYTHON]) +py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` +AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) +AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ +ifelse([$2],[], [prog=" +import sys +try: + import $1 +except ImportError: + sys.exit(1) +except: + sys.exit(0) +sys.exit(0)"], [prog=" +import $1 +$1.$2"]) +if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC + then + eval "py_cv_mod_$py_mod_var=yes" + else + eval "py_cv_mod_$py_mod_var=no" + fi +]) +py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` +if test "x$py_val" != xno; then + AC_MSG_RESULT(yes) + ifelse([$3], [],, [$3 +])dnl +else + AC_MSG_RESULT(no) + ifelse([$4], [],, [$4 +])dnl +fi +]) + +dnl a macro to check for ability to create python extensions +dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) +dnl function also defines PYTHON_INCLUDES +AC_DEFUN([AM_CHECK_PYTHON_HEADERS], +[AC_REQUIRE([AM_PATH_PYTHON]) +AC_MSG_CHECKING(for headers required to compile python extensions) +dnl deduce PYTHON_INCLUDES +py_prefix=`$PYTHON -c "import sys; print sys.prefix"` +py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` +PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" +if test "$py_prefix" != "$py_exec_prefix"; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" +fi +AC_SUBST(PYTHON_INCLUDES) +dnl check if the headers exist: +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" +AC_TRY_CPP([#include <Python.h>],dnl +[AC_MSG_RESULT(found) +$1],dnl +[AC_MSG_RESULT(not found) +$2]) +CPPFLAGS="$save_CPPFLAGS" +]) diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..c3a7eb0 --- /dev/null +++ b/configure.ac @@ -0,0 +1,83 @@ +-*- mode: m4 -*- +AC_PREREQ(2.52) + +dnl The dbus-python version number (must actually be numeric at the moment) +m4_define(dbus_python_major_version, 0) +m4_define(dbus_python_minor_version, 79) +m4_define(dbus_python_micro_version, 93) +m4_define(dbus_python_version, dbus_python_major_version.dbus_python_minor_version.dbus_python_micro_version) + +dnl versions of packages we require ... +dnl m4_define(glib_required_version, 2.8.0) + +AC_INIT(dbus-python, dbus_python_version, + [http://bugzilla.gnome.org/enter_bug.cgi?product=dbus&component=python]) +AC_SUBST(ACLOCAL_AMFLAGS, "-I autotools -I .") +AC_CONFIG_AUX_DIR(autotools) +AC_CONFIG_MACRO_DIR(autotools) + +AC_DEFINE(DBUS_PYTHON_MAJOR_VERSION, dbus_python_major_version, [dbus-python major version]) +AC_SUBST(DBUS_PYTHON_MAJOR_VERSION, dbus_python_major_version) +AC_DEFINE(DBUS_PYTHON_MINOR_VERSION, dbus_python_minor_version, [dbus-python minor version]) +AC_SUBST(DBUS_PYTHON_MINOR_VERSION, dbus_python_minor_version) +AC_DEFINE(DBUS_PYTHON_MICRO_VERSION, dbus_python_micro_version, [dbus-python micro version]) +AC_SUBST(DBUS_PYTHON_MICRO_VERSION, dbus_python_micro_version) + +AC_CONFIG_SRCDIR([_dbus_bindings/module.c]) +AM_CONFIG_HEADER(config.h) + +AM_INIT_AUTOMAKE + +dnl put the ACLOCAL flags in the makefile +ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" + +AC_CANONICAL_BUILD +AC_CANONICAL_HOST + +AC_DISABLE_STATIC + +dnl XXXX hack to kill off all the libtool tags ... +dnl it isn't like we are using C++ or Fortran. +dnl (copied from libglade/configure.in) +m4_define([_LT_AC_TAGCONFIG],[]) + +AC_PROG_LIBTOOL + +AM_PATH_PYTHON(2.4.0) + +AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) + +PLATFORM=`$PYTHON -c "from distutils import util; print util.get_platform()"` +AC_SUBST(PLATFORM) + +dnl Building documentation +AC_ARG_ENABLE(api-docs, +AC_HELP_STRING([--enable-api-docs], [Enable documentation building (requires epydoc 3 and docutils)]),, enable_api_docs=no) +AM_CHECK_PYMOD([docutils], [__version__], [:], [enable_api_docs=no]) +if test "${enable_api_docs}" != no; then + AC_PATH_PROG([EPYDOC], [epydoc]) + if test -z "$EPYDOC"; then + enable_api_docs=no + fi +fi + +AM_CONDITIONAL(ENABLE_API_DOCS, test x$enable_api_docs != xno) + +PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.0 dbus-glib-1 >= 0.70]) +PKG_CHECK_MODULES(DBUS_GLIB, [dbus-1 >= 1.0 dbus-glib-1 >= 0.70]) + +dnl add required cflags ... +JH_ADD_CFLAG([-Wall]) +JH_ADD_CFLAG([-Wextra]) +JH_ADD_CFLAG([-Wno-missing-field-initializers]) +JH_ADD_CFLAG([-Wdeclaration-after-statement]) +JH_ADD_CFLAG([-std=c9x]) +JH_ADD_CFLAG([-fno-strict-aliasing]) + +AC_CONFIG_FILES( + Makefile + dbus-python.pc + dbus/_version.py + test/tmp-session-bus.conf + test/TestSuitePythonService.service) +AC_OUTPUT diff --git a/dbus-python.pc.in b/dbus-python.pc.in new file mode 100644 index 0000000..65f98fa --- /dev/null +++ b/dbus-python.pc.in @@ -0,0 +1,11 @@ +# This file is currently Python-version-independent. +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +datarootdir=@datarootdir@ +datadir=@datadir@ + +Name: dbus-python +Description: Python bindings for D-Bus +Requires: dbus-1 +Version: @VERSION@ diff --git a/dbus/__init__.py b/dbus/__init__.py index 2050ec3..185e0d8 100644 --- a/dbus/__init__.py +++ b/dbus/__init__.py @@ -4,7 +4,7 @@ to export objects or claim well-known names. The first thing you need to do is connect dbus-python to a main loop implementation. Currently, the only working implementation is (still) -to use pygobject and libdbus-glib: +to use pygobject and libdbus-glib:: from gobject import MainLoop, idle_add from dbus.mainloop.glib import DBusGMainLoop @@ -97,8 +97,8 @@ in the same way as above, and call its ``connect_to_signal`` method. You can also connect to signals in a generic way using the `Bus.add_signal_receiver` method. -Either way, a `SignalMatch` object is returned - this object has a `remove` -method which you can call to stop receiving that signal. +Either way, a ``SignalMatch`` object is returned - this object has a +``remove`` method which you can call to stop receiving that signal. Receiving signals happens asynchronously, so it only works while the main loop is running. @@ -170,9 +170,11 @@ __all__ = ( 'service', 'mainloop', 'lowlevel' ) __docformat__ = 'restructuredtext' -# version is really 0.80rc2, but you can't represent that in this form -version = (0, 79, 92) -__version__ = '.'.join(map(str, version)) + +try: + from dbus._version import version, __version__ +except ImportError: + pass # OLPC Sugar compatibility import dbus.exceptions as exceptions diff --git a/dbus/_version.py.in b/dbus/_version.py.in new file mode 100644 index 0000000..c43d5c4 --- /dev/null +++ b/dbus/_version.py.in @@ -0,0 +1,3 @@ +# @CONFIGURE_INPUT@ +version = (@DBUS_PYTHON_MAJOR_VERSION@, @DBUS_PYTHON_MINOR_VERSION@, @DBUS_PYTHON_MICRO_VERSION@) +__version__ = "@DBUS_PYTHON_MAJOR_VERSION@.@DBUS_PYTHON_MINOR_VERSION@.@DBUS_PYTHON_MICRO_VERSION@" diff --git a/dbus/introspect_parser.py b/dbus/introspect_parser.py index 0ed7ac4..889ffe5 100644 --- a/dbus/introspect_parser.py +++ b/dbus/introspect_parser.py @@ -31,12 +31,12 @@ def process_introspection_data(data): ``interface.signal`` strings to the concatenation of all their parameters. - Example:: + Example output:: - { - 'com.example.SignalEmitter.OneString': 's', - 'com.example.MethodImplementor.OneInt32Argument': 'i', - } + { + 'com.example.SignalEmitter.OneString': 's', + 'com.example.MethodImplementor.OneInt32Argument': 'i', + } """ method_map = {} diff --git a/include/dbus-python.h b/include/dbus-python.h index 9d6d581..e1fe288 100644 --- a/include/dbus-python.h +++ b/include/dbus-python.h @@ -1,4 +1,5 @@ /* C API for _dbus_bindings, used by _dbus_glib_bindings. + * This file is currently Python-version-independent. * * Copyright (C) 2006 Collabora Ltd. * @@ -31,30 +32,32 @@ DBUS_BEGIN_DECLS +typedef void (*_dbus_py_func_ptr)(void); + +typedef dbus_bool_t (*_dbus_py_conn_setup_func)(DBusConnection *, void *); +typedef dbus_bool_t (*_dbus_py_srv_setup_func)(DBusServer *, void *); +typedef void (*_dbus_py_free_func)(void *); + #define DBUS_BINDINGS_API_COUNT 3 #ifdef INSIDE_DBUS_PYTHON_BINDINGS -#define Connection_BorrowDBusConnection DBusPyConnection_BorrowDBusConnection -#define NativeMainLoop_New4 DBusPyNativeMainLoop_New4 extern DBusConnection *DBusPyConnection_BorrowDBusConnection(PyObject *); -extern PyObject *DBusPyNativeMainLoop_New4(dbus_bool_t (*)(DBusConnection *, void *), - dbus_bool_t (*)(DBusServer *, void *), - void (*)(void *), - void *); +extern PyObject *DBusPyNativeMainLoop_New4(_dbus_py_conn_setup_func, + _dbus_py_srv_setup_func, + _dbus_py_free_func, + void *); #else static PyObject *_dbus_bindings_module = NULL; -static void **dbus_bindings_API; +static _dbus_py_func_ptr *dbus_bindings_API; #define DBusPyConnection_BorrowDBusConnection \ (*(DBusConnection *(*)(PyObject *))dbus_bindings_API[1]) #define DBusPyNativeMainLoop_New4 \ - ((PyObject *(*)(dbus_bool_t (*)(DBusConnection *, void *),\ - dbus_bool_t (*)(DBusServer *, void *),\ - void (*)(void *),\ - void *))dbus_bindings_API[2]) + ((PyObject *(*)(_dbus_py_conn_setup_func, _dbus_py_srv_setup_func, \ + _dbus_py_free_func, void *))dbus_bindings_API[2]) static int import_dbus_bindings(const char *this_module_name) @@ -69,7 +72,7 @@ import_dbus_bindings(const char *this_module_name) c_api = PyObject_GetAttrString(_dbus_bindings_module, "_C_API"); if (c_api == NULL) return -1; if (PyCObject_Check(c_api)) { - dbus_bindings_API = (void **)PyCObject_AsVoidPtr(c_api); + dbus_bindings_API = (_dbus_py_func_ptr *)PyCObject_AsVoidPtr(c_api); } else { Py_DECREF(c_api); diff --git a/test/TestSuitePythonService.service.in b/test/TestSuitePythonService.service.in new file mode 100644 index 0000000..5abdf20 --- /dev/null +++ b/test/TestSuitePythonService.service.in @@ -0,0 +1,3 @@ +[D-BUS Service] +Name=org.freedesktop.DBus.TestSuitePythonService +Exec=/bin/bash -c "@PYTHON@ @abs_top_srcdir@/test/test-service.py" diff --git a/test/run-test.sh b/test/run-test.sh index 0e519f6..6e31505 100755 --- a/test/run-test.sh +++ b/test/run-test.sh @@ -1,41 +1,44 @@ #! /bin/bash -function die() +function die() { if ! test -z "$DBUS_SESSION_BUS_PID" ; then - echo "killing message bus "$DBUS_SESSION_BUS_PID >&2 - kill -9 $DBUS_SESSION_BUS_PID + echo "killing message bus $DBUS_SESSION_BUS_PID" >&2 + kill -9 "$DBUS_SESSION_BUS_PID" fi - echo $SCRIPTNAME: $* >&2 - + echo "$SCRIPTNAME: $*" >&2 exit 1 } +if test -z "$PYTHON"; then + echo "Warning: \$PYTHON not set, assuming 'python'" >&2 + export PYTHON=python +fi -SCRIPTNAME=$0 -MODE=$1 +if test -z "$DBUS_TOP_SRCDIR" ; then + die "Must set DBUS_TOP_SRCDIR" +fi -#create service file -SERVICE_DIR=test/data/valid-service-files/ -SERVICE_FILE=$SERVICE_DIR/test-python.service -mkdir -p $SERVICE_DIR -echo "[D-BUS Service]" > $SERVICE_FILE -echo "Name=org.freedesktop.DBus.TestSuitePythonService" >> $SERVICE_FILE -echo "Exec=`pwd`/test/test-service.py" >> $SERVICE_FILE +if test -z "$DBUS_TOP_BUILDDIR" ; then + die "Must set DBUS_TOP_BUILDDIR" +fi + +SCRIPTNAME=$0 ## so the tests can complain if you fail to use the script to launch them export DBUS_TEST_PYTHON_RUN_TEST_SCRIPT=1 -export LD_LIBRARY_PATH="$DBUS_TOP_BUILDDIR/dbus" # Rerun ourselves with tmp session bus if we're not already if test -z "$DBUS_TEST_PYTHON_IN_RUN_TEST"; then DBUS_TEST_PYTHON_IN_RUN_TEST=1 export DBUS_TEST_PYTHON_IN_RUN_TEST - exec tools/run-with-tmp-session-bus.sh $SCRIPTNAME $MODE + exec "$DBUS_TOP_SRCDIR"/test/run-with-tmp-session-bus.sh $SCRIPTNAME fi -#dbus-monitor >&2 & echo "running test-standalone.py" -$DEBUGGER python test/test-standalone.py || die "test-standalone.py failed" +$PYTHON "$DBUS_TOP_SRCDIR"/test/test-standalone.py || die "test-standalone.py failed" echo "running test-client.py" -$DEBUGGER python test/test-client.py || die "test-client.py failed" +$PYTHON "$DBUS_TOP_SRCDIR"/test/test-client.py || die "test-client.py failed" echo "running test-signals.py" -$DEBUGGER python test/test-signals.py || die "test-signals.py failed" +$PYTHON "$DBUS_TOP_SRCDIR"/test/test-signals.py || die "test-signals.py failed" + +rm -f "$DBUS_TOP_BUILDDIR"/test/test-service.log +exit 0 diff --git a/test/run-with-tmp-session-bus.sh b/test/run-with-tmp-session-bus.sh new file mode 100755 index 0000000..d03569f --- /dev/null +++ b/test/run-with-tmp-session-bus.sh @@ -0,0 +1,51 @@ +#! /bin/bash + +SCRIPTNAME=$0 +WRAPPED_SCRIPT=$1 +shift + +function die() +{ + if ! test -z "$DBUS_SESSION_BUS_PID" ; then + echo "killing message bus $DBUS_SESSION_BUS_PID" >&2 + kill -9 "$DBUS_SESSION_BUS_PID" + fi + echo "$SCRIPTNAME: $*" >&2 + exit 1 +} + +if test -z "$DBUS_TOP_BUILDDIR" ; then + die "Must set DBUS_TOP_BUILDDIR" +fi + +## convenient to be able to ctrl+C without leaking the message bus process +trap 'die "Received SIGINT"' SIGINT + +CONFIG_FILE="$DBUS_TOP_BUILDDIR"/test/tmp-session-bus.conf + +unset DBUS_SESSION_BUS_ADDRESS +unset DBUS_SESSION_BUS_PID + +echo "Running dbus-launch --sh-syntax --config-file=$CONFIG_FILE" >&2 +eval `dbus-launch --sh-syntax --config-file=$CONFIG_FILE` + +if test -z "$DBUS_SESSION_BUS_PID" ; then + die "Failed to launch message bus for introspection generation to run" +fi + +echo "Started bus pid $DBUS_SESSION_BUS_PID at $DBUS_SESSION_BUS_ADDRESS" >&2 + +# Execute wrapped script +echo "Running: $WRAPPED_SCRIPT $*" >&2 +"$WRAPPED_SCRIPT" "$@" || die "script \"$WRAPPED_SCRIPT\" failed" + +kill -TERM "$DBUS_SESSION_BUS_PID" \ + || die "Message bus vanished! should not have happened" \ + && echo "Killed daemon $DBUS_SESSION_BUS_PID" >&2 + +sleep 2 + +## be sure it really died +kill -9 $DBUS_SESSION_BUS_PID > /dev/null 2>&1 || true + +exit 0 diff --git a/test/test-client.py b/test/test-client.py index 3c4d8fb..f834365 100755 --- a/test/test-client.py +++ b/test/test-client.py @@ -29,11 +29,8 @@ import time import logging import weakref -builddir = os.environ["DBUS_TOP_BUILDDIR"] -pydir = builddir - -sys.path.insert(0, pydir) -sys.path.insert(0, pydir + 'dbus') +builddir = os.path.normpath(os.environ["DBUS_TOP_BUILDDIR"]) +pydir = os.path.normpath(os.environ["DBUS_TOP_SRCDIR"]) import dbus import _dbus_bindings @@ -49,7 +46,7 @@ pkg = dbus.__file__ if not pkg.startswith(pydir): raise Exception("DBus modules (%s) are not being picked up from the package"%pkg) -if not _dbus_bindings.__file__.startswith(pydir): +if not _dbus_bindings.__file__.startswith(builddir): raise Exception("DBus modules (%s) are not being picked up from the package"%_dbus_bindings.__file__) test_types_vals = [1, 12323231, 3.14159265, 99999999.99, diff --git a/test/test-service.py b/test/test-service.py index 6c1c043..f62e2fb 100755 --- a/test/test-service.py +++ b/test/test-service.py @@ -25,11 +25,8 @@ import sys import os import logging -builddir = os.environ["DBUS_TOP_BUILDDIR"] -pydir = builddir - -sys.path.insert(0, pydir) -sys.path.insert(0, pydir + 'dbus') +builddir = os.path.normpath(os.environ["DBUS_TOP_BUILDDIR"]) +pydir = os.path.normpath(os.environ["DBUS_TOP_SRCDIR"]) import dbus @@ -42,7 +39,7 @@ import gobject import random -logging.basicConfig(filename=pydir + '/test-service.log', filemode='w') +logging.basicConfig(filename=builddir + '/test/test-service.log', filemode='w') logging.getLogger().setLevel(1) logger = logging.getLogger('test-service') diff --git a/test/test-signals.py b/test/test-signals.py index 8600ed7..e8d387a 100644 --- a/test/test-signals.py +++ b/test/test-signals.py @@ -28,11 +28,8 @@ import unittest import time import logging -builddir = os.environ["DBUS_TOP_BUILDDIR"] -pydir = builddir - -sys.path.insert(0, pydir) -sys.path.insert(0, pydir + 'dbus') +builddir = os.path.normpath(os.environ["DBUS_TOP_BUILDDIR"]) +pydir = os.path.normpath(os.environ["DBUS_TOP_SRCDIR"]) import dbus import _dbus_bindings @@ -50,7 +47,7 @@ pkg = dbus.__file__ if not pkg.startswith(pydir): raise Exception("DBus modules (%s) are not being picked up from the package"%pkg) -if not _dbus_bindings.__file__.startswith(pydir): +if not _dbus_bindings.__file__.startswith(builddir): raise Exception("DBus modules (%s) are not being picked up from the package"%_dbus_bindings.__file__) class TestSignals(unittest.TestCase): diff --git a/test/test-standalone.py b/test/test-standalone.py index 843c044..a7e2d1a 100755 --- a/test/test-standalone.py +++ b/test/test-standalone.py @@ -26,22 +26,27 @@ import unittest import time from traceback import print_exc -builddir = os.environ["DBUS_TOP_BUILDDIR"] -pydir = builddir - -sys.path.insert(0, pydir) -sys.path.insert(0, pydir + 'dbus') +builddir = os.path.normpath(os.environ["DBUS_TOP_BUILDDIR"]) +pydir = os.path.normpath(os.environ["DBUS_TOP_SRCDIR"]) import _dbus_bindings import dbus import dbus.types as types -pkg = dbus.__file__ -if not pkg.startswith(pydir): - raise Exception("DBus modules (%s) are not being picked up from the package"%pkg) - -if not _dbus_bindings.__file__.startswith(pydir): +# Check that we're using the right versions +if not dbus.__file__.startswith(pydir): + raise Exception("DBus modules (%s) are not being picked up from the package"%dbus.__file__) +if not _dbus_bindings.__file__.startswith(builddir): raise Exception("DBus modules (%s) are not being picked up from the package"%_dbus_bindings.__file__) +assert (_dbus_bindings._python_version & 0xffff0000 + == sys.hexversion & 0xffff0000), \ + '_dbus_bindings was compiled for Python %x but this is Python %x, '\ + 'a different major version'\ + % (_dbus_bindings._python_version, sys.hexversion) +assert _dbus_bindings.__version__ == os.environ['DBUS_PYTHON_VERSION'], \ + '_dbus_bindings was compiled as version %s but Automake says '\ + 'we should be version %s' \ + % (_dbus_bindings.__version__, os.environ['DBUS_PYTHON_VERSION']) class TestTypes(unittest.TestCase): diff --git a/tools/session.conf b/test/tmp-session-bus.conf.in index 73a38f1..9d172ff 100644 --- a/tools/session.conf +++ b/test/tmp-session-bus.conf.in @@ -1,16 +1,12 @@ -<!-- This configuration file controls the per-user-login-session message bus. - Add a session-local.conf and edit that rather than changing this - file directly. --> - +<!-- @configure_input@ --> <!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> <busconfig> <!-- Our well-known bus type, don't change this --> <type>session</type> + <listen>unix:tmpdir=@abs_top_builddir@/test</listen> - <listen>unix:tmpdir=./</listen> - - <servicedir></servicedir> + <servicedir>@abs_top_builddir@/test</servicedir> <policy context="default"> <!-- Allow everything to be sent --> @@ -22,3 +18,4 @@ </policy> </busconfig> +<!-- vim:set ft=xml sts=2 sw=2 et: --> diff --git a/tools/run-with-tmp-session-bus.sh b/tools/run-with-tmp-session-bus.sh deleted file mode 100755 index 0ebf228..0000000 --- a/tools/run-with-tmp-session-bus.sh +++ /dev/null @@ -1,65 +0,0 @@ -#! /bin/bash - -SCRIPTNAME=$0 -WRAPPED_SCRIPT=$1 -shift - -function die() -{ - if ! test -z "$DBUS_SESSION_BUS_PID" ; then - echo "killing message bus "$DBUS_SESSION_BUS_PID >&2 - kill -9 $DBUS_SESSION_BUS_PID - fi - echo $SCRIPTNAME: $* >&2 - exit 1 -} - -if test -z "$DBUS_TOP_BUILDDIR" ; then - die "Must set DBUS_TOP_BUILDDIR" -fi - -## convenient to be able to ctrl+C without leaking the message bus process -trap 'die "Received SIGINT"' SIGINT - -CONFIG_FILE=./run-with-tmp-session-bus.conf -SERVICE_DIR="`pwd`/test/data/valid-service-files" -ESCAPED_SERVICE_DIR=`echo $SERVICE_DIR | sed -e 's/\//\\\\\\//g'` -echo "escaped service dir is: $ESCAPED_SERVICE_DIR" >&2 - -## create a configuration file based on the standard session.conf -cat tools/session.conf | \ - sed -e 's/<servicedir>.*$/<servicedir>'$ESCAPED_SERVICE_DIR'<\/servicedir>/g' | \ - sed -e 's/<include.*$//g' \ - > $CONFIG_FILE - -echo "Created configuration file $CONFIG_FILE" >&2 - -export PATH=$DBUS_TOP_BUILDDIR/bus:$PATH -## the libtool script found by the path search should already do this, but -export LD_LIBRARY_PATH=$DBUS_TOP_BUILDDIR/dbus/.libs:$LD_LIBRARY_PATH - -unset DBUS_SESSION_BUS_ADDRESS -unset DBUS_SESSION_BUS_PID - -#export DBUS_VERBOSE=1 -echo "Running dbus-launch --sh-syntax --config-file=$CONFIG_FILE" >&2 -eval `dbus-launch --sh-syntax --config-file=$CONFIG_FILE` - -if test -z "$DBUS_SESSION_BUS_PID" ; then - die "Failed to launch message bus for introspection generation to run" -fi - -echo "Started bus pid $DBUS_SESSION_BUS_PID at $DBUS_SESSION_BUS_ADDRESS" >&2 - -# Execute wrapped script -echo "Running $WRAPPED_SCRIPT $@" >&2 -$WRAPPED_SCRIPT "$@" || die "script \"$WRAPPED_SCRIPT\" failed" - -kill -TERM $DBUS_SESSION_BUS_PID || die "Message bus vanished! should not have happened" && echo "Killed daemon $DBUS_SESSION_BUS_PID" >&2 - -sleep 2 - -## be sure it really died -kill -9 $DBUS_SESSION_BUS_PID > /dev/null 2>&1 || true - -exit 0 |