summaryrefslogtreecommitdiff
path: root/dbus
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2016-03-05 16:36:08 +0000
committerSimon McVittie <smcv@debian.org>2016-03-05 16:36:22 +0000
commite119bf86c5a4a10ea4ed048df3a5d4a78fa15d5c (patch)
treecccb307c94f8ef1c5b87bd0691edb53806a80e57 /dbus
parent13f590af2ee74b2b01c5c1a3414a92764648c89e (diff)
downloaddbus-python-e119bf86c5a4a10ea4ed048df3a5d4a78fa15d5c.tar.gz
Get the version from the C code, not by generating a Python file
This means we never try to import dbus/_version.py from the ${builddir}, which won't work. Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'dbus')
-rw-r--r--dbus/__init__.py8
-rw-r--r--dbus/_version.py.in3
2 files changed, 3 insertions, 8 deletions
diff --git a/dbus/__init__.py b/dbus/__init__.py
index eb9717a..e96bd99 100644
--- a/dbus/__init__.py
+++ b/dbus/__init__.py
@@ -72,15 +72,13 @@ if is_py2:
__docformat__ = 'restructuredtext'
-try:
- from dbus._version import version, __version__
-except ImportError:
- pass
-
# OLPC Sugar compatibility
import dbus.exceptions as exceptions
import dbus.types as types
+from _dbus_bindings import __version__
+version = tuple(map(int, __version__.split('.')))
+
from _dbus_bindings import (
get_default_main_loop, set_default_main_loop, validate_bus_name,
validate_error_name, validate_interface_name, validate_member_name,
diff --git a/dbus/_version.py.in b/dbus/_version.py.in
deleted file mode 100644
index 9b3e466..0000000
--- a/dbus/_version.py.in
+++ /dev/null
@@ -1,3 +0,0 @@
-# @configure_input@
-__version__ = "@PACKAGE_VERSION@"
-version = tuple(map(int, __version__.split('.')))