]>
Commit | Line | Data |
---|---|---|
93e9b41f JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without doc # don't build doc | |
4 | %bcond_without tests # do not perform "make test" | |
5 | ||
6 | Summary: Python module to run and analyze benchmarks | |
7 | Summary(pl.UTF-8): Moduł Pythona do uruchamiania i analizy testów wydajności | |
8 | Name: python3-pyperf | |
9 | Version: 2.0.0 | |
5cf9b725 | 10 | Release: 3 |
93e9b41f JB |
11 | License: MIT |
12 | Group: Libraries/Python | |
13 | #Source0Download: https://pypi.org/simple/pyperf/ | |
14 | Source0: https://files.pythonhosted.org/packages/source/p/pyperf/pyperf-%{version}.tar.gz | |
15 | # Source0-md5: 7f62d3f6fc5475138791d3d883fdf4cd | |
16 | URL: https://pypi.org/project/pyperf/ | |
17 | BuildRequires: python3-modules >= 1:3.4 | |
18 | BuildRequires: python3-setuptools | |
19 | %if %{with tests} | |
20 | BuildRequires: python3-nose | |
21 | BuildRequires: python3-psutil | |
22 | %endif | |
23 | BuildRequires: rpm-pythonprov | |
24 | BuildRequires: rpmbuild(macros) >= 1.714 | |
25 | %if %{with doc} | |
26 | BuildRequires: sphinx-pdg-3 | |
27 | %endif | |
28 | Requires: python3-modules >= 1:3.4 | |
29 | BuildArch: noarch | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
33 | The Python pyperf module is a toolkit to write, run and analyze | |
34 | benchmarks. | |
35 | ||
36 | %description -l pl.UTF-8 | |
37 | Moduł Pythona pyperf to zestaw narzędzi do tworzenia, uruchamiania i | |
38 | analizy testów wydajności (benchmarków). | |
39 | ||
40 | %package apidocs | |
41 | Summary: API documentation for Python pyperf module | |
42 | Summary(pl.UTF-8): Dokumentacja API modułu Pythona pyperf | |
43 | Group: Documentation | |
44 | ||
45 | %description apidocs | |
46 | API documentation for Python pyperf module. | |
47 | ||
48 | %description apidocs -l pl.UTF-8 | |
49 | Dokumentacja API modułu Pythona pyperf. | |
50 | ||
51 | %prep | |
52 | %setup -q -n pyperf-%{version} | |
53 | ||
54 | %build | |
55 | %py3_build | |
56 | ||
57 | %if %{with tests} | |
58 | PYTHONPATH=$(pwd) \ | |
59 | %{__python3} -m nose pyperf/tests | |
60 | %endif | |
61 | ||
62 | %if %{with doc} | |
63 | %{__make} -C doc html \ | |
64 | SPHINXBUILD=sphinx-build-3 | |
65 | %endif | |
66 | ||
67 | %install | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %py3_install | |
71 | ||
72 | %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/pyperf/tests | |
73 | ||
74 | %clean | |
75 | rm -rf $RPM_BUILD_ROOT | |
76 | ||
77 | %files | |
78 | %defattr(644,root,root,755) | |
79 | %doc COPYING README.rst TODO.rst | |
80 | %attr(755,root,root) %{_bindir}/pyperf | |
81 | %{py3_sitescriptdir}/pyperf | |
82 | %{py3_sitescriptdir}/pyperf-%{version}-py*.egg-info | |
83 | ||
84 | %if %{with doc} | |
85 | %files apidocs | |
86 | %defattr(644,root,root,755) | |
87 | %doc doc/build/html/{_images,_static,*.html,*.js} | |
88 | %endif |