]> git.pld-linux.org Git - packages/python-line_profiler.git/blame - python-line_profiler.spec
Release 7 (by relup.sh)
[packages/python-line_profiler.git] / python-line_profiler.spec
CommitLineData
b1135905
MK
1#
2# Conditional build:
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
7
cd7cf9c2 8%define module line_profiler
b1135905
MK
9Summary: module for doing line-by-line profiling of functions
10Summary(pl.UTF-8): Moduł do optymalizacji linia po linii kodu funkcji
11# Name must match the python module/package name (as in 'import' statement)
12Name: python-%{module}
b0abd0f6 13Version: 2.1
4100708a 14Release: 7
b1135905
MK
15License: BSD
16Group: Libraries/Python
b0abd0f6
AM
17Source0: https://github.com/rkern/line_profiler/archive/%{version}.tar.gz
18# Source0-md5: bd1cb2ba21af02339beab7ddc3a69c66
b1135905 19URL: https://github.com/rkern/line_profiler
18023865 20BuildRequires: rpmbuild(macros) >= 1.710
b1135905
MK
21BuildRequires: rpm-pythonprov
22%if %{with python2}
c3634a62 23BuildRequires: python-Cython
b1135905
MK
24BuildRequires: python-devel
25BuildRequires: python-distribute
b0abd0f6 26BuildRequires: python-ipython
e61696de 27BuildRequires: python-prompt_toolkit
b1135905
MK
28%endif
29%if %{with python3}
c3634a62 30BuildRequires: python3-Cython
b1135905
MK
31BuildRequires: python3-devel
32BuildRequires: python3-distribute
b0abd0f6 33BuildRequires: python3-ipython
b1135905 34BuildRequires: python3-modules
e61696de 35BuildRequires: python3-prompt_toolkit
b1135905
MK
36%endif
37Requires: python-modules
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
41line_profiler will profile the time individual lines of code take to
42execute. The profiler is implemented in C via Cython in order to
43reduce the overhead of profiling
44
45%description -l pl.UTF-8
46line_profile wskazuje czas wykonywania poszczególnych linii kodu. Jest
47zaimplementowany w C poprzez Cythona tak aby zredukować narzut
48profilowania.
49
50%package -n python3-%{module}
51Summary: -
52Summary(pl.UTF-8): -
53Group: Libraries/Python
54Requires: python3-modules
55
56%description -n python3-%{module}
57line_profiler will profile the time individual lines of code take to
58execute. The profiler is implemented in C via Cython in order to
59reduce the overhead of profiling
60
61%description -n python3-%{module} -l pl.UTF-8
62line_profile wskazuje czas wykonywania poszczególnych linii kodu. Jest
63zaimplementowany w C poprzez Cythona tak aby zredukować narzut
64profilowania.
65
66%package apidocs
67Summary: %{module} API documentation
68Summary(pl.UTF-8): Dokumentacja API %{module}
69Group: Documentation
70
71%description apidocs
72API documentation for %{module}.
73
74%description apidocs -l pl.UTF-8
75Dokumentacja API %{module}.
76
77%prep
78%setup -q -n %{module}-%{version}
79
80%build
81%if %{with python2}
82CC="%{__cc}" \
cd7cf9c2 83CFLAGS="%{rpmcppflags} %{rpmcflags} -DHAVE_GETTIMEOFDAY" \
8541e604 84%py_build %{?with_tests:test}
b1135905
MK
85%endif
86
87%if %{with python3}
88CC="%{__cc}" \
cd7cf9c2 89CFLAGS="%{rpmcppflags} %{rpmcflags} -DHAVE_GETTIMEOFDAY" \
8541e604 90%py3_build %{?with_tests:test}
b1135905
MK
91%endif
92
93%if %{with doc}
94cd docs
95%{__make} -j1 html
96rm -rf _build/html/_sources
97%endif
98
99%install
100rm -rf $RPM_BUILD_ROOT
101
102%if %{with python2}
8541e604 103%py_install
b1135905
MK
104
105%py_postclean
106%endif
107
108%if %{with python3}
8541e604 109%py3_install
b1135905
MK
110%endif
111
112%clean
113rm -rf $RPM_BUILD_ROOT
114
115%if %{with python2}
116%files
117%defattr(644,root,root,755)
118%doc LICENSE.txt README.rst
119%{py_sitedir}/kernprof.py[co]
120%{py_sitedir}/line_profiler.py[co]
121%attr(755,root,root) %{py_sitedir}/_line_profiler.so
122%if "%{py_ver}" > "2.4"
123%{py_sitedir}/%{module}-%{version}-py*.egg-info
124%endif
125%endif
126
127%if %{with python3}
128%files -n python3-%{module}
129%defattr(644,root,root,755)
130%doc LICENSE.txt README.rst
131%{py3_sitedir}/kernprof.py
132%{py3_sitedir}/line_profiler.py
133%{py3_sitedir}/__pycache__
60d1c445 134%attr(755,root,root) %{py3_sitedir}/_line_profiler.cpython-*.so
b1135905
MK
135%attr(755,root,root) %{_bindir}/kernprof
136%{py3_sitedir}/%{module}-%{version}-py*.egg-info
137%endif
138
139%if %{with doc}
140%files apidocs
141%defattr(644,root,root,755)
142%doc docs/_build/html/*
143%endif
This page took 0.13061 seconds and 4 git commands to generate.