]> git.pld-linux.org Git - packages/python-tdbus.git/blame - python-tdbus.spec
user-after-free fix added from upstream git
[packages/python-tdbus.git] / python-tdbus.spec
CommitLineData
2a09529a
JK
1
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
a0ff4b52 5%bcond_without python3 # CPython 3.x module
2a09529a
JK
6
7%define module tdbus
8Summary: Simple ("trivial") Python bindings for D-BUS
9Name: python-%{module}
a0ff4b52
JK
10Version: 0.10
11Release: 1
2a09529a
JK
12License: MIT
13Group: Libraries/Python
a0ff4b52
JK
14Source0: https://github.com/hmvp/python-tdbus/archive/v0.10/%{name}-%{version}.tar.gz
15# Source0-md5: 6033776d458aae287d2f9d92a801a42d
30215a09 16Patch0: use_after_free.patch
2a09529a
JK
17URL: https://github.com/hmvp/python-tdbus
18BuildRequires: rpm-pythonprov
d78fde49 19BuildRequires: rpmbuild(macros) >= 1.710
2a09529a
JK
20%if %{with python2}
21BuildRequires: python-devel
41b46a01 22BuildRequires: python-gevent
a0ff4b52 23BuildRequires: python-setuptools
2a09529a
JK
24%endif
25%if %{with python3}
26BuildRequires: python3-devel
41b46a01 27BuildRequires: python3-gevent
a0ff4b52 28BuildRequires: python3-setuptools
2a09529a 29%endif
2a09529a
JK
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%description
33Python-tdbus is a simple ("trivial") python interface for D-BUS. It
34builds directly on top of libdbus and has no other dependencies. Some
35benefits of python-tdbus with respect to the standard dbus-python [1]_
36Python bindings:
37
38 - The code is extremely simple. Python-tdbus is < 2.000 lines of code
39 (C and Python), while dbus-python contains > 15.000 lines of code.
40 - Event loop integration is not required for sending and receiving
41 signals (if you can afford to block).
42 - Includes `gevent' [2]_ event loop integration.
43 - Event loop integration can be achieved in Python code rather than in
44 C.
45 - Uses native Python types for method and signal arguments, driven by
46 a simple format string.
47 - Provides a more "correct" object model (IMHO) where there's separate
48 Dispatcher and Connection objects, instead of putting dispatching
49 functionality into the connection object.
50
51%package -n python3-%{module}
52Summary: Simple ("trivial") Python bindings for D-BUS
53Group: Libraries/Python
54
55%description -n python3-%{module}
56Python-tdbus is a simple ("trivial") python interface for D-BUS. It
57builds directly on top of libdbus and has no other dependencies. Some
58benefits of python-tdbus with respect to the standard dbus-python [1]_
59Python bindings:
60
61 - The code is extremely simple. Python-tdbus is < 2.000 lines of code
62 (C and Python), while dbus-python contains > 15.000 lines of code.
63 - Event loop integration is not required for sending and receiving
64 signals (if you can afford to block).
65 - Includes `gevent' [2]_ event loop integration.
66 - Event loop integration can be achieved in Python code rather than in
67 C.
68 - Uses native Python types for method and signal arguments, driven by
69 a simple format string.
70 - Provides a more "correct" object model (IMHO) where there's separate
71 Dispatcher and Connection objects, instead of putting dispatching
72 functionality into the connection object.
73
74%package apidocs
75Summary: %{module} API documentation
76Summary(pl.UTF-8): Dokumentacja API %{module}
77Group: Documentation
78
79%description apidocs
80API documentation for %{module}.
81
82%description apidocs -l pl.UTF-8
83Dokumentacja API %{module}.
84
85%prep
86%setup -q
30215a09 87%patch0 -p1
2a09529a
JK
88
89%build
90%if %{with python2}
a6570077 91%py_build %{?with_tests:test}
2a09529a
JK
92%endif
93
94%if %{with python3}
a6570077 95%py3_build %{?with_tests:test}
2a09529a
JK
96%endif
97
98%install
99rm -rf $RPM_BUILD_ROOT
100
101%if %{with python2}
a6570077 102%py_install
2a09529a
JK
103
104%py_postclean
105%endif
106
107%if %{with python3}
a6570077 108%py3_install
2a09529a
JK
109%endif
110
111%clean
112rm -rf $RPM_BUILD_ROOT
113
114%if %{with python2}
115%files
116%defattr(644,root,root,755)
a0ff4b52 117%doc AUTHORS CHANGES HACKING README.rst
2a09529a
JK
118%dir %{py_sitedir}/%{module}
119%{py_sitedir}/%{module}/*.py[co]
120%attr(755,root,root) %{py_sitedir}/%{module}/_tdbus.so
2a09529a
JK
121%{py_sitedir}/*.egg-info
122%endif
2a09529a
JK
123
124%if %{with python3}
125%files -n python3-%{module}
126%defattr(644,root,root,755)
a0ff4b52
JK
127%doc AUTHORS CHANGES HACKING README.rst
128%dir %{py3_sitedir}/%{module}
129%{py3_sitedir}/%{module}/__pycache__
130%{py3_sitedir}/%{module}/*.py
131%attr(755,root,root) %{py3_sitedir}/%{module}/_tdbus*.so
2a09529a
JK
132%{py3_sitedir}/*.egg-info
133%endif
This page took 0.141795 seconds and 4 git commands to generate.