]>
Commit | Line | Data |
---|---|---|
d6313429 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 | ||
7 | Summary: Tool to measure, monitor and analyse the memory behaviour of Python 2 objects | |
8 | Summary(pl.UTF-8): Narzędzie do pomiaru, monitorowania i analizy zachowania pamięciowego obiektów Pythona 2 | |
9 | Name: python-pympler | |
22898193 | 10 | Version: 0.9 |
654f28ab | 11 | Release: 3 |
d6313429 JB |
12 | License: Apache v2.0 |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.org/simple/pympler/ | |
15 | Source0: https://files.pythonhosted.org/packages/source/P/Pympler/Pympler-%{version}.tar.gz | |
22898193 | 16 | # Source0-md5: b1553e2e0b69c8c5e502011a604eaed3 |
b1a301d8 | 17 | Patch0: %{name}-tests.patch |
d6313429 JB |
18 | URL: https://pythonhosted.org/Pympler/ |
19 | BuildRequires: rpm-pythonprov | |
20 | BuildRequires: rpmbuild(macros) >= 1.714 | |
21 | %if %{with python2} | |
b1a301d8 | 22 | BuildRequires: python-modules >= 1:2.7 |
c021aa79 JB |
23 | %if %{with tests} |
24 | BuildRequires: idle | |
25 | %endif | |
d6313429 JB |
26 | %endif |
27 | %if %{with python3} | |
2745b9ea | 28 | BuildRequires: python3-modules >= 1:3.4 |
c021aa79 | 29 | # no idlelib.TreeWidget in python 3.6+, functionality skipped |
d6313429 | 30 | %endif |
b1a301d8 | 31 | Requires: python-modules >= 1:2.7 |
d6313429 JB |
32 | BuildArch: noarch |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | Pympler is a development tool to measure, monitor and analyse the | |
37 | memory behaviour of Python objects in a running Python application. | |
38 | ||
39 | %description -l pl.UTF-8 | |
40 | Pympler to narzędzie programistyczne do pomiaru, monitorowania i | |
41 | analizy zachowania pamięciowego obiektów Pythona w działającej | |
42 | aplikacji. | |
43 | ||
44 | %package -n python3-pympler | |
45 | Summary: Tool to measure, monitor and analyse the memory behaviour of Python 3 objects | |
46 | Summary(pl.UTF-8): Narzędzie do pomiaru, monitorowania i analizy zachowania pamięciowego obiektów Pythona 3 | |
47 | Group: Libraries/Python | |
2745b9ea | 48 | Requires: python3-modules >= 1:3.4 |
d6313429 JB |
49 | |
50 | %description -n python3-pympler | |
51 | Pympler is a development tool to measure, monitor and analyse the | |
52 | memory behaviour of Python objects in a running Python application. | |
53 | ||
54 | %description -n python3-pympler -l pl.UTF-8 | |
55 | Pympler to narzędzie programistyczne do pomiaru, monitorowania i | |
56 | analizy zachowania pamięciowego obiektów Pythona w działającej | |
57 | aplikacji. | |
58 | ||
59 | %prep | |
60 | %setup -q -n Pympler-%{version} | |
b1a301d8 | 61 | %patch0 -p1 |
d6313429 JB |
62 | |
63 | %build | |
64 | %if %{with python2} | |
65 | %py_build | |
66 | ||
67 | %if %{with tests} | |
68 | PYTHONPATH=$(pwd) \ | |
69 | %{__python} test/runtest.py -post-install -verbose 3 | |
70 | %endif | |
71 | %endif | |
72 | ||
73 | %if %{with python3} | |
74 | %py3_build | |
75 | ||
76 | %if %{with tests} | |
77 | PYTHONPATH=$(pwd) \ | |
78 | %{__python3} test/runtest.py -post-install -verbose 3 | |
79 | %endif | |
80 | %endif | |
81 | ||
82 | %install | |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | ||
85 | %if %{with python2} | |
86 | %py_install | |
87 | ||
88 | %py_postclean | |
89 | %endif | |
90 | ||
91 | %if %{with python3} | |
92 | %py3_install | |
93 | %endif | |
94 | ||
95 | %clean | |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | ||
98 | %if %{with python2} | |
99 | %files | |
100 | %defattr(644,root,root,755) | |
101 | %doc NOTICE README.md | |
102 | %{py_sitescriptdir}/pympler | |
103 | %{py_sitescriptdir}/Pympler-%{version}-py*.egg-info | |
104 | %endif | |
105 | ||
106 | %if %{with python3} | |
107 | %files -n python3-pympler | |
108 | %defattr(644,root,root,755) | |
109 | %doc NOTICE README.md | |
110 | %{py3_sitescriptdir}/pympler | |
111 | %{py3_sitescriptdir}/Pympler-%{version}-py*.egg-info | |
112 | %endif |