Release 12 (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
c7e5366f 14Release: 12
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 31BuildRequires: python3-devel
b0abd0f6 32BuildRequires: python3-ipython
b1135905 33BuildRequires: python3-modules
e61696de 34BuildRequires: python3-prompt_toolkit
b1135905
MK
35%endif
36Requires: python-modules
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40line_profiler will profile the time individual lines of code take to
41execute. The profiler is implemented in C via Cython in order to
42reduce the overhead of profiling
43
44%description -l pl.UTF-8
45line_profile wskazuje czas wykonywania poszczególnych linii kodu. Jest
46zaimplementowany w C poprzez Cythona tak aby zredukować narzut
47profilowania.
48
49%package -n python3-%{module}
50Summary: -
51Summary(pl.UTF-8): -
52Group: Libraries/Python
53Requires: python3-modules
54
55%description -n python3-%{module}
56line_profiler will profile the time individual lines of code take to
57execute. The profiler is implemented in C via Cython in order to
58reduce the overhead of profiling
59
60%description -n python3-%{module} -l pl.UTF-8
61line_profile wskazuje czas wykonywania poszczególnych linii kodu. Jest
62zaimplementowany w C poprzez Cythona tak aby zredukować narzut
63profilowania.
64
65%package apidocs
66Summary: %{module} API documentation
67Summary(pl.UTF-8): Dokumentacja API %{module}
68Group: Documentation
69
70%description apidocs
71API documentation for %{module}.
72
73%description apidocs -l pl.UTF-8
74Dokumentacja API %{module}.
75
76%prep
77%setup -q -n %{module}-%{version}
78
79%build
80%if %{with python2}
81CC="%{__cc}" \
cd7cf9c2 82CFLAGS="%{rpmcppflags} %{rpmcflags} -DHAVE_GETTIMEOFDAY" \
8541e604 83%py_build %{?with_tests:test}
b1135905
MK
84%endif
85
86%if %{with python3}
87CC="%{__cc}" \
cd7cf9c2 88CFLAGS="%{rpmcppflags} %{rpmcflags} -DHAVE_GETTIMEOFDAY" \
8541e604 89%py3_build %{?with_tests:test}
b1135905
MK
90%endif
91
92%if %{with doc}
93cd docs
94%{__make} -j1 html
95rm -rf _build/html/_sources
96%endif
97
98%install
99rm -rf $RPM_BUILD_ROOT
100
101%if %{with python2}
8541e604 102%py_install
b1135905
MK
103
104%py_postclean
105%endif
106
107%if %{with python3}
8541e604 108%py3_install
b1135905
MK
109%endif
110
111%clean
112rm -rf $RPM_BUILD_ROOT
113
114%if %{with python2}
115%files
116%defattr(644,root,root,755)
117%doc LICENSE.txt README.rst
118%{py_sitedir}/kernprof.py[co]
119%{py_sitedir}/line_profiler.py[co]
120%attr(755,root,root) %{py_sitedir}/_line_profiler.so
121%if "%{py_ver}" > "2.4"
122%{py_sitedir}/%{module}-%{version}-py*.egg-info
123%endif
124%endif
125
126%if %{with python3}
127%files -n python3-%{module}
128%defattr(644,root,root,755)
129%doc LICENSE.txt README.rst
130%{py3_sitedir}/kernprof.py
131%{py3_sitedir}/line_profiler.py
132%{py3_sitedir}/__pycache__
60d1c445 133%attr(755,root,root) %{py3_sitedir}/_line_profiler.cpython-*.so
b1135905
MK
134%attr(755,root,root) %{_bindir}/kernprof
135%{py3_sitedir}/%{module}-%{version}-py*.egg-info
136%endif
137
138%if %{with doc}
139%files apidocs
140%defattr(644,root,root,755)
141%doc docs/_build/html/*
142%endif
This page took 0.097112 seconds and 4 git commands to generate.