]> git.pld-linux.org Git - packages/python-dbusmock.git/blob - python-dbusmock.spec
rebuild with tests and docs
[packages/python-dbusmock.git] / python-dbusmock.spec
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
7 Summary:        Mock D-Bus objects
8 Summary(pl.UTF-8):      Atrapa obiektów D-Bus
9 Name:           python-dbusmock
10 Version:        0.19
11 Release:        5
12 License:        LGPL v3+
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/
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.5
20 BuildRequires:  python-setuptools
21 %if %{with tests}
22 BuildRequires:  python-dbus
23 BuildRequires:  python-nose
24 %endif
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-modules >= 1:3.2
28 BuildRequires:  python3-setuptools
29 %if %{with tests}
30 BuildRequires:  python3-nose
31 %endif
32 %endif
33 BuildRequires:  rpm-pythonprov
34 BuildRequires:  rpmbuild(macros) >= 1.714
35 Requires:       python-modules >= 1:2.5
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
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.
45
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
52 oczekiwany w testach.
53
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
59
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.
66
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
73 oczekiwany 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
96 rm -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
109 rm -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.064161 seconds and 3 git commands to generate.