]> git.pld-linux.org Git - packages/python-pympler.git/blob - python-pympler.spec
2baa40efb0a16c842cb09899b4eb3b0e3116567e
[packages/python-pympler.git] / python-pympler.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:        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
10 Version:        0.9
11 Release:        2
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
16 # Source0-md5:  b1553e2e0b69c8c5e502011a604eaed3
17 Patch0:         %{name}-tests.patch
18 URL:            https://pythonhosted.org/Pympler/
19 BuildRequires:  rpm-pythonprov
20 BuildRequires:  rpmbuild(macros) >= 1.714
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 %if %{with tests}
24 BuildRequires:  idle
25 %endif
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-modules >= 1:3.4
29 # no idlelib.TreeWidget in python 3.6+, functionality skipped
30 %endif
31 Requires:       python-modules >= 1:2.7
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
48 Requires:       python3-modules >= 1:3.4
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}
61 %patch0 -p1
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
This page took 0.126082 seconds and 2 git commands to generate.