3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
7 Summary: Mock D-Bus objects
8 Summary(pl.UTF-8): Atrapa obiektów D-Bus
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/python-dbusmock/
15 Source0: https://files.pythonhosted.org/packages/source/p/python-dbusmock/python-dbusmock-%{version}.tar.gz
16 # Source0-md5: 565aaae672e065c9c17e7fafd1843701
17 URL: https://pypi.org/project/python-dbusmock/
19 BuildRequires: python-modules >= 1:2.5
20 BuildRequires: python-setuptools
22 BuildRequires: python-dbus
23 BuildRequires: python-nose
27 BuildRequires: python3-modules >= 1:3.2
28 BuildRequires: python3-setuptools
30 BuildRequires: python3-nose
33 BuildRequires: rpm-pythonprov
34 BuildRequires: rpmbuild(macros) >= 1.714
35 Requires: python-modules >= 1:2.5
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
40 With this program/Python library you can easily create mock objects on
41 D-Bus. This is useful for writing tests for software which talks to
42 D-Bus services such as upower, systemd, logind, gnome-session or
43 others, and it is hard (or impossible without root privileges) to set
44 the state of the real services to what you expect in your tests.
46 %description -l pl.UTF-8
47 Przy użyciu tej biblioteki Pythona można łatwo tworzyć obiekty atrap
48 na szynie D-Bus. Jest to przydatne do pisania testów oprogramowania
49 komunikującego się z usługami D-Bus, takimi jak upower, systemd,
50 logind, gnome-session itp., kiedy trudne jest (lub niemożliwe bez
51 uprawnień administratora) ustawienie stanu rzeczywistych usług na
54 %package -n python3-dbusmock
55 Summary: Mock D-Bus objects
56 Summary(pl.UTF-8): Atrapa obiektów D-Bus
57 Group: Libraries/Python
58 Requires: python3-modules >= 1:3.2
60 %description -n python3-dbusmock
61 With this program/Python library you can easily create mock objects on
62 D-Bus. This is useful for writing tests for software which talks to
63 D-Bus services such as upower, systemd, logind, gnome-session or
64 others, and it is hard (or impossible without root privileges) to set
65 the state of the real services to what you expect in your tests.
67 %description -n python3-dbusmock -l pl.UTF-8
68 Przy użyciu tej biblioteki Pythona można łatwo tworzyć obiekty atrap
69 na szynie D-Bus. Jest to przydatne do pisania testów oprogramowania
70 komunikującego się z usługami D-Bus, takimi jak upower, systemd,
71 logind, gnome-session itp., kiedy trudne jest (lub niemożliwe bez
72 uprawnień administratora) ustawienie stanu rzeczywistych usług na
83 %{__python} -m nose tests
91 %{__python3} -m nose tests
96 rm -rf $RPM_BUILD_ROOT
109 rm -rf $RPM_BUILD_ROOT
113 %defattr(644,root,root,755)
115 %{py_sitescriptdir}/dbusmock
116 %{py_sitescriptdir}/python_dbusmock-%{version}-py*.egg-info
120 %files -n python3-dbusmock
121 %defattr(644,root,root,755)
123 %{py3_sitescriptdir}/dbusmock
124 %{py3_sitescriptdir}/python_dbusmock-%{version}-py*.egg-info