]> git.pld-linux.org Git - packages/python-tdbus.git/blob - python-tdbus.spec
542ace01ae47df07b022a1a4d4383ba63d8dad87
[packages/python-tdbus.git] / python-tdbus.spec
1
2 # Conditional build:
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
6
7 %define         module  tdbus
8 Summary:        Simple ("trivial") Python bindings for D-BUS
9 Name:           python-%{module}
10 Version:        0.10
11 Release:        1
12 License:        MIT
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
19 %if %{with python2}
20 BuildRequires:  python-devel
21 BuildRequires:  python-gevent
22 BuildRequires:  python-setuptools
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3-devel
26 BuildRequires:  python3-gevent
27 BuildRequires:  python3-setuptools
28 %endif
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
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]_
35 Python bindings:
36
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
43    C.
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.
49
50 %package -n python3-%{module}
51 Summary:        Simple ("trivial") Python bindings for D-BUS
52 Group:          Libraries/Python
53
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]_
58 Python bindings:
59
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
66    C.
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.
72
73 %package apidocs
74 Summary:        %{module} API documentation
75 Summary(pl.UTF-8):      Dokumentacja API %{module}
76 Group:          Documentation
77
78 %description apidocs
79 API documentation for %{module}.
80
81 %description apidocs -l pl.UTF-8
82 Dokumentacja API %{module}.
83
84 %prep
85 %setup -q
86
87 %build
88 %if %{with python2}
89 %py_build %{?with_tests:test}
90 %endif
91
92 %if %{with python3}
93 %py3_build %{?with_tests:test}
94 %endif
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with python2}
100 %py_install
101
102 %py_postclean
103 %endif
104
105 %if %{with python3}
106 %py3_install
107 %endif
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %if %{with python2}
113 %files
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
120 %endif
121
122 %if %{with python3}
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
131 %endif
This page took 0.076332 seconds and 2 git commands to generate.