setup.py for dbus-python or all-in-one installer

Simon McVittie simon.mcvittie at collabora.co.uk
Fri Jun 29 09:49:16 PDT 2012


On 29/06/12 16:23, Mark Mikofski wrote:
> Has there been any work on either a setup.py using distutils for
> dbus-python

dbus-python (and telepathy-python, which I used to maintain) both used
distutils in the past. I stopped doing that after several releases had
to be redone (with no source changes!) when source files were
inexplicably missing from the released tarball.

Autotools' "make distcheck" automatically verifies that the release
tarball is complete, functional and passes tests. Making correct
releases and testing them is tedious and it's easy to forget a step - we
should let the computer do as much of the work as possible :-)

> I am starting work on the following:
> 1. setup.py using distutils for dbus-python
> 2. cmake/cpack for dbus-python and dbus-glib (and pkg-config?)

... distutils *and* cmake? Really?

> I would hate to reduplicate efforts

Don't try to maintain a third build system, then :-)

> Unfortunately the
> current mingw32 based dbus-python module doesn't work with the windows
> version of Python 2.7 which uses MS Visual Studio 2008 Redistributable.

Bug reports welcome, but I'll need a bit more than "doesn't work". The
three parts of a useful bug report are: What, precisely, did you do?
What did you expect would happen? What actually happened?

According to Google, you might need to put libpython27 through mingw's
dlltool to make an import library, link the _dbus_bindings module to
libpython, and/or give the _dbus_bindings module the .pyd extension.

For the latter two, please try configuring with:

    ./configure ... LDFLAGS="\$(PYTHON_LIBS) -no-undefined -shrext .pyd"

(adapted from python-gobject) and if that works, we can easily do the
equivalent in the Makefile.am to fix it permanently.

> not all apps will use gdbus

In the long term, GLib applications that use D-Bus should all use GDBus.
dbus-python does not follow good Python design[1] and cannot be made to
do so while remaining compatible.

    S

[1] python -c "import this". Particularly this bit: "In the face of
ambiguity, refuse the temptation to guess".


More information about the dbus mailing list