3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
8 Summary: Simple ("trivial") Python bindings for D-BUS
13 Group: Libraries/Python
14 Source0: https://github.com/hmvp/python-tdbus/archive/v0.10/%{name}-%{version}.tar.gz
15 # Source0-md5: 6033776d458aae287d2f9d92a801a42d
16 URL: https://github.com/hmvp/python-tdbus
17 BuildRequires: rpm-pythonprov
18 BuildRequires: rpmbuild(macros) >= 1.710
20 BuildRequires: python-devel
21 BuildRequires: python-gevent
22 BuildRequires: python-setuptools
25 BuildRequires: python3-devel
26 BuildRequires: python3-gevent
27 BuildRequires: python3-setuptools
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Python-tdbus is a simple ("trivial") python interface for D-BUS. It
33 builds directly on top of libdbus and has no other dependencies. Some
34 benefits of python-tdbus with respect to the standard dbus-python [1]_
37 - The code is extremely simple. Python-tdbus is < 2.000 lines of code
38 (C and Python), while dbus-python contains > 15.000 lines of code.
39 - Event loop integration is not required for sending and receiving
40 signals (if you can afford to block).
41 - Includes `gevent' [2]_ event loop integration.
42 - Event loop integration can be achieved in Python code rather than in
44 - Uses native Python types for method and signal arguments, driven by
45 a simple format string.
46 - Provides a more "correct" object model (IMHO) where there's separate
47 Dispatcher and Connection objects, instead of putting dispatching
48 functionality into the connection object.
50 %package -n python3-%{module}
51 Summary: Simple ("trivial") Python bindings for D-BUS
52 Group: Libraries/Python
54 %description -n python3-%{module}
55 Python-tdbus is a simple ("trivial") python interface for D-BUS. It
56 builds directly on top of libdbus and has no other dependencies. Some
57 benefits of python-tdbus with respect to the standard dbus-python [1]_
60 - The code is extremely simple. Python-tdbus is < 2.000 lines of code
61 (C and Python), while dbus-python contains > 15.000 lines of code.
62 - Event loop integration is not required for sending and receiving
63 signals (if you can afford to block).
64 - Includes `gevent' [2]_ event loop integration.
65 - Event loop integration can be achieved in Python code rather than in
67 - Uses native Python types for method and signal arguments, driven by
68 a simple format string.
69 - Provides a more "correct" object model (IMHO) where there's separate
70 Dispatcher and Connection objects, instead of putting dispatching
71 functionality into the connection object.
74 Summary: %{module} API documentation
75 Summary(pl.UTF-8): Dokumentacja API %{module}
79 API documentation for %{module}.
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API %{module}.
89 %py_build %{?with_tests:test}
93 %py3_build %{?with_tests:test}
97 rm -rf $RPM_BUILD_ROOT
110 rm -rf $RPM_BUILD_ROOT
114 %defattr(644,root,root,755)
115 %doc AUTHORS CHANGES HACKING README.rst
116 %dir %{py_sitedir}/%{module}
117 %{py_sitedir}/%{module}/*.py[co]
118 %attr(755,root,root) %{py_sitedir}/%{module}/_tdbus.so
119 %{py_sitedir}/*.egg-info
123 %files -n python3-%{module}
124 %defattr(644,root,root,755)
125 %doc AUTHORS CHANGES HACKING README.rst
126 %dir %{py3_sitedir}/%{module}
127 %{py3_sitedir}/%{module}/__pycache__
128 %{py3_sitedir}/%{module}/*.py
129 %attr(755,root,root) %{py3_sitedir}/%{module}/_tdbus*.so
130 %{py3_sitedir}/*.egg-info