3 %bcond_with doc # don't build doc (not povided 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 ## TODO: consider rename to flask_debugtoolbar_lineprofilerpanel ?
8 %define module flask-debugtoolbar-lineprofilerpanel
9 Summary: Panel for the Flask Debug toolbar to capture and view line-by-line profiling stats
10 Summary(pl.UTF-8): Pandel do Flask Debug toolbar do analizy statystyk wykonania kodu linia po linii
11 Name: python-%{module}
15 Group: Libraries/Python
16 Source0: https://pypi.python.org/packages/source/F/Flask-DebugToolbar-LineProfilerPanel/Flask-DebugToolbar-LineProfilerPanel-%{version}.tar.gz
17 # Source0-md5: 005d47cb98cff464ce9042b9bf66c230
18 URL: https://github.com/phleet/flask_debugtoolbar_lineprofilerpanel
19 BuildRequires: rpmbuild(macros) >= 1.710
20 BuildRequires: rpm-pythonprov
22 BuildRequires: python-distribute
23 BuildRequires: python-flask-debugtoolbar
24 BuildRequires: python-line_profiler
28 BuildRequires: python3-distribute
29 BuildRequires: python3-flask-debugtoolbar
30 BuildRequires: python3-line_profiler
31 BuildRequires: python3-modules
34 # Below Rs only work for main package (python2)
35 #Requires: python-libs
36 Requires: python-modules
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 Panel for flask_debugtoolbar which enables the ability to view line
42 profiling information from selected functions. The line profile
43 information comes from the line_profiler module.
45 %description -l pl.UTF-8
46 Panel dla flask_debugtoolbar który pozwala zobaczyć i zanalizować
47 czasy wykonania linii wybranych funkcji. Informacje są pobierane z
50 %package -n python3-%{module}
51 Summary: Panel for the Flask Debug toolbar to capture and view line-by-line profiling stats
52 Summary(pl.UTF-8): Pandel do Flask Debug toolbar do analizy statystyk wykonania kodu linia po linii
53 Group: Libraries/Python
54 Requires: python3-modules
56 %description -n python3-%{module}
57 Panel for flask_debugtoolbar which enables the ability to view line
58 profiling information from selected functions. The line profile
59 information comes from the line_profiler module.
61 %description -n python3-%{module} -l pl.UTF-8
62 Panel dla flask_debugtoolbar który pozwala zobaczyć i zanalizować
63 czasy wykonania linii wybranych funkcji. Informacje są pobierane z
67 Summary: %{module} API documentation
68 Summary(pl.UTF-8): Dokumentacja API %{module}
72 API documentation for %{module}.
74 %description apidocs -l pl.UTF-8
75 Dokumentacja API %{module}.
78 %setup -q -n Flask-DebugToolbar-LineProfilerPanel-%{version}
79 # Until fixed upstream:
80 sed -i 's/line-profiler>=1.0b3/line_profiler>=1.0/g' setup.py
84 %py_build %{?with_tests:test}
88 %py3_build %{?with_tests:test}
94 rm -rf _build/html/_sources
98 rm -rf $RPM_BUILD_ROOT
111 rm -rf $RPM_BUILD_ROOT
115 %defattr(644,root,root,755)
116 %{py_sitescriptdir}/flask_debugtoolbar_lineprofilerpanel
117 %if "%{py_ver}" > "2.4"
118 %{py_sitescriptdir}/Flask_DebugToolbar_LineProfilerPanel-%{version}-py*.egg-info
123 %files -n python3-%{module}
124 %defattr(644,root,root,755)
125 %{py3_sitescriptdir}/flask_debugtoolbar_lineprofilerpanel
126 %{py3_sitescriptdir}/Flask_DebugToolbar_LineProfilerPanel-%{version}-py*.egg-info
131 %defattr(644,root,root,755)
132 %doc docs/_build/html/*