]> git.pld-linux.org Git - packages/python-line_profiler.git/blame - python-line_profiler.spec
BR: rpmbuild(macros) >= 1.710
[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
8%define module line_profiler
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}
13Version: 1.0
e214549e 14Release: 6
b1135905
MK
15License: BSD
16Group: Libraries/Python
17Source0: https://pypi.python.org/packages/source/l/%{module}/%{module}-%{version}.tar.gz
18# Source0-md5: 2f8352acfedf83f701a564583db5e14d
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
26%endif
27%if %{with python3}
c3634a62 28BuildRequires: python3-Cython
b1135905
MK
29BuildRequires: python3-devel
30BuildRequires: python3-distribute
31BuildRequires: python3-modules
32%endif
33Requires: python-modules
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
37line_profiler will profile the time individual lines of code take to
38execute. The profiler is implemented in C via Cython in order to
39reduce the overhead of profiling
40
41%description -l pl.UTF-8
42line_profile wskazuje czas wykonywania poszczególnych linii kodu. Jest
43zaimplementowany w C poprzez Cythona tak aby zredukować narzut
44profilowania.
45
46%package -n python3-%{module}
47Summary: -
48Summary(pl.UTF-8): -
49Group: Libraries/Python
50Requires: python3-modules
51
52%description -n python3-%{module}
53line_profiler will profile the time individual lines of code take to
54execute. The profiler is implemented in C via Cython in order to
55reduce the overhead of profiling
56
57%description -n python3-%{module} -l pl.UTF-8
58line_profile wskazuje czas wykonywania poszczególnych linii kodu. Jest
59zaimplementowany w C poprzez Cythona tak aby zredukować narzut
60profilowania.
61
62%package apidocs
63Summary: %{module} API documentation
64Summary(pl.UTF-8): Dokumentacja API %{module}
65Group: Documentation
66
67%description apidocs
68API documentation for %{module}.
69
70%description apidocs -l pl.UTF-8
71Dokumentacja API %{module}.
72
73%prep
74%setup -q -n %{module}-%{version}
75
76%build
77%if %{with python2}
78CC="%{__cc}" \
79CFLAGS="%{rpmcppflags} %{rpmcflags}" \
8541e604 80%py_build %{?with_tests:test}
b1135905
MK
81%endif
82
83%if %{with python3}
84CC="%{__cc}" \
85CFLAGS="%{rpmcppflags} %{rpmcflags}" \
8541e604 86%py3_build %{?with_tests:test}
b1135905
MK
87%endif
88
89%if %{with doc}
90cd docs
91%{__make} -j1 html
92rm -rf _build/html/_sources
93%endif
94
95%install
96rm -rf $RPM_BUILD_ROOT
97
98%if %{with python2}
8541e604 99%py_install
b1135905
MK
100
101%py_postclean
102%endif
103
104%if %{with python3}
8541e604 105%py3_install
b1135905
MK
106%endif
107
108%clean
109rm -rf $RPM_BUILD_ROOT
110
111%if %{with python2}
112%files
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
120%endif
121%endif
122
123%if %{with python3}
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__
60d1c445 130%attr(755,root,root) %{py3_sitedir}/_line_profiler.cpython-*.so
b1135905
MK
131%attr(755,root,root) %{_bindir}/kernprof
132%{py3_sitedir}/%{module}-%{version}-py*.egg-info
133%endif
134
135%if %{with doc}
136%files apidocs
137%defattr(644,root,root,755)
138%doc docs/_build/html/*
139%endif
This page took 0.100854 seconds and 4 git commands to generate.