]> git.pld-linux.org Git - packages/python-dbusmock.git/blame - python-dbusmock.spec
rebuild with tests and docs
[packages/python-dbusmock.git] / python-dbusmock.spec
CommitLineData
a967358f
JB
1#
2# Conditional build:
3%bcond_without tests # unit tests
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Mock D-Bus objects
8Summary(pl.UTF-8): Atrapa obiektów D-Bus
9Name: python-dbusmock
10Version: 0.19
896b816e 11Release: 5
a967358f
JB
12License: LGPL v3+
13Group: Libraries/Python
14#Source0Download: https://pypi.org/simple/python-dbusmock/
15Source0: https://files.pythonhosted.org/packages/source/p/python-dbusmock/python-dbusmock-%{version}.tar.gz
16# Source0-md5: 565aaae672e065c9c17e7fafd1843701
17URL: https://pypi.org/project/python-dbusmock/
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.5
20BuildRequires: python-setuptools
21%if %{with tests}
22BuildRequires: python-dbus
23BuildRequires: python-nose
24%endif
25%endif
26%if %{with python3}
27BuildRequires: python3-modules >= 1:3.2
28BuildRequires: python3-setuptools
29%if %{with tests}
30BuildRequires: python3-nose
31%endif
32%endif
33BuildRequires: rpm-pythonprov
34BuildRequires: rpmbuild(macros) >= 1.714
35Requires: python-modules >= 1:2.5
36BuildArch: noarch
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40With this program/Python library you can easily create mock objects on
41D-Bus. This is useful for writing tests for software which talks to
42D-Bus services such as upower, systemd, logind, gnome-session or
43others, and it is hard (or impossible without root privileges) to set
44the state of the real services to what you expect in your tests.
45
46%description -l pl.UTF-8
47Przy użyciu tej biblioteki Pythona można łatwo tworzyć obiekty atrap
48na szynie D-Bus. Jest to przydatne do pisania testów oprogramowania
49komunikującego się z usługami D-Bus, takimi jak upower, systemd,
50logind, gnome-session itp., kiedy trudne jest (lub niemożliwe bez
51uprawnień administratora) ustawienie stanu rzeczywistych usług na
52oczekiwany w testach.
53
54%package -n python3-dbusmock
55Summary: Mock D-Bus objects
56Summary(pl.UTF-8): Atrapa obiektów D-Bus
57Group: Libraries/Python
58Requires: python3-modules >= 1:3.2
59
60%description -n python3-dbusmock
61With this program/Python library you can easily create mock objects on
62D-Bus. This is useful for writing tests for software which talks to
63D-Bus services such as upower, systemd, logind, gnome-session or
64others, and it is hard (or impossible without root privileges) to set
65the state of the real services to what you expect in your tests.
66
67%description -n python3-dbusmock -l pl.UTF-8
68Przy użyciu tej biblioteki Pythona można łatwo tworzyć obiekty atrap
69na szynie D-Bus. Jest to przydatne do pisania testów oprogramowania
70komunikującego się z usługami D-Bus, takimi jak upower, systemd,
71logind, gnome-session itp., kiedy trudne jest (lub niemożliwe bez
72uprawnień administratora) ustawienie stanu rzeczywistych usług na
73oczekiwany w testach.
74
75%prep
76%setup -q
77
78%build
79%if %{with python2}
80%py_build
81
82%if %{with tests}
83%{__python} -m nose tests
84%endif
85%endif
86
87%if %{with python3}
88%py3_build
89
90%if %{with tests}
91%{__python3} -m nose tests
92%endif
93%endif
94
95%install
96rm -rf $RPM_BUILD_ROOT
97
98%if %{with python2}
99%py_install
100
101%py_postclean
102%endif
103
104%if %{with python3}
105%py3_install
106%endif
107
108%clean
109rm -rf $RPM_BUILD_ROOT
110
111%if %{with python2}
112%files
113%defattr(644,root,root,755)
114%doc NEWS README.rst
115%{py_sitescriptdir}/dbusmock
116%{py_sitescriptdir}/python_dbusmock-%{version}-py*.egg-info
117%endif
118
119%if %{with python3}
120%files -n python3-dbusmock
121%defattr(644,root,root,755)
122%doc NEWS README.rst
123%{py3_sitescriptdir}/dbusmock
124%{py3_sitescriptdir}/python_dbusmock-%{version}-py*.egg-info
125%endif
This page took 0.085242 seconds and 4 git commands to generate.