3 %bcond_with doc # don't build doc (not provided by package)
4 %bcond_without tests # do not perform "make test"
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module line_profiler
9 Summary: module for doing line-by-line profiling of functions
10 Summary(pl.UTF-8): Moduł do optymalizacji linia po linii kodu funkcji
11 # Name must match the python module/package name (as in 'import' statement)
12 Name: python-%{module}
16 Group: Libraries/Python
17 Source0: https://pypi.python.org/packages/source/l/%{module}/%{module}-%{version}.tar.gz
18 # Source0-md5: 2f8352acfedf83f701a564583db5e14d
19 URL: https://github.com/rkern/line_profiler
20 BuildRequires: rpmbuild(macros) >= 1.710
21 BuildRequires: rpm-pythonprov
23 BuildRequires: python-Cython
24 BuildRequires: python-devel
25 BuildRequires: python-distribute
28 BuildRequires: python3-Cython
29 BuildRequires: python3-devel
30 BuildRequires: python3-distribute
31 BuildRequires: python3-modules
33 Requires: python-modules
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 line_profiler will profile the time individual lines of code take to
38 execute. The profiler is implemented in C via Cython in order to
39 reduce the overhead of profiling
41 %description -l pl.UTF-8
42 line_profile wskazuje czas wykonywania poszczególnych linii kodu. Jest
43 zaimplementowany w C poprzez Cythona tak aby zredukować narzut
46 %package -n python3-%{module}
49 Group: Libraries/Python
50 Requires: python3-modules
52 %description -n python3-%{module}
53 line_profiler will profile the time individual lines of code take to
54 execute. The profiler is implemented in C via Cython in order to
55 reduce the overhead of profiling
57 %description -n python3-%{module} -l pl.UTF-8
58 line_profile wskazuje czas wykonywania poszczególnych linii kodu. Jest
59 zaimplementowany w C poprzez Cythona tak aby zredukować narzut
63 Summary: %{module} API documentation
64 Summary(pl.UTF-8): Dokumentacja API %{module}
68 API documentation for %{module}.
70 %description apidocs -l pl.UTF-8
71 Dokumentacja API %{module}.
74 %setup -q -n %{module}-%{version}
79 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
80 %py_build %{?with_tests:test}
85 CFLAGS="%{rpmcppflags} %{rpmcflags}" \
86 %py3_build %{?with_tests:test}
92 rm -rf _build/html/_sources
96 rm -rf $RPM_BUILD_ROOT
109 rm -rf $RPM_BUILD_ROOT
113 %defattr(644,root,root,755)
114 %doc LICENSE.txt README.rst
115 %{py_sitedir}/kernprof.py[co]
116 %{py_sitedir}/line_profiler.py[co]
117 %attr(755,root,root) %{py_sitedir}/_line_profiler.so
118 %if "%{py_ver}" > "2.4"
119 %{py_sitedir}/%{module}-%{version}-py*.egg-info
124 %files -n python3-%{module}
125 %defattr(644,root,root,755)
126 %doc LICENSE.txt README.rst
127 %{py3_sitedir}/kernprof.py
128 %{py3_sitedir}/line_profiler.py
129 %{py3_sitedir}/__pycache__
130 %attr(755,root,root) %{py3_sitedir}/_line_profiler.cpython-*.so
131 %attr(755,root,root) %{_bindir}/kernprof
132 %{py3_sitedir}/%{module}-%{version}-py*.egg-info
137 %defattr(644,root,root,755)
138 %doc docs/_build/html/*