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