Run local dbus-daemon instead of using user session.
BuildRequires: python3-gevent
BuildRequires: python3-setuptools
%endif
BuildRequires: python3-gevent
BuildRequires: python3-setuptools
%endif
+%if %{with tests}
+BuildRequires: /usr/bin/dbus-launch
+%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
+unset DISPLAY
+unset DBUS_SESSION_BUS_ADDRESS
+unset XDG_RUNTIME_DIR
+
+%if %{with tests}
+eval $(dbus-launch --sh-syntax)
+%endif
+
%if %{with python2}
%py_build %{?with_tests:test}
%endif
%if %{with python2}
%py_build %{?with_tests:test}
%endif