]> git.pld-linux.org Git - packages/python-flask-debugtoolbar-lineprofilerpanel.git/blame - python-flask-debugtoolbar-lineprofilerpanel.spec
Release 2. Fixed egg dependencies.
[packages/python-flask-debugtoolbar-lineprofilerpanel.git] / python-flask-debugtoolbar-lineprofilerpanel.spec
CommitLineData
3b3eae2e
MK
1#
2# Conditional build:
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
9Summary: Panel for the Flask Debug toolbar to capture and view line-by-line profiling stats
10Summary(pl.UTF-8): Pandel do Flask Debug toolbar do analizy statystyk wykonania kodu linia po linii
11Name: python-%{module}
12Version: 1.0.2
35b83c75 13Release: 2
3b3eae2e
MK
14License: MIT
15Group: Libraries/Python
16Source0: https://pypi.python.org/packages/source/F/Flask-DebugToolbar-LineProfilerPanel/Flask-DebugToolbar-LineProfilerPanel-%{version}.tar.gz
17# Source0-md5: 005d47cb98cff464ce9042b9bf66c230
18URL: https://github.com/phleet/flask_debugtoolbar_lineprofilerpanel
19BuildRequires: rpm-pythonprov
20%if %{with python2}
21BuildRequires: python-distribute
22BuildRequires: python-flask-debugtoolbar
23BuildRequires: python-line_profiler
24
25%endif
26%if %{with python3}
27BuildRequires: python3-distribute
28BuildRequires: python3-flask-debugtoolbar
29BuildRequires: python3-line_profiler
30BuildRequires: python3-modules
31
32%endif
33# Below Rs only work for main package (python2)
34#Requires: python-libs
35Requires: python-modules
36BuildArch: noarch
37BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39%description
40Panel for flask_debugtoolbar which enables the ability to view line
41profiling information from selected functions. The line profile
42information comes from the line_profiler module.
43
44%description -l pl.UTF-8
45Panel dla flask_debugtoolbar który pozwala zobaczyć i zanalizować
46czasy wykonania linii wybranych funkcji. Informacje są pobierane z
47modułu line_profiler.
48
49%package -n python3-%{module}
50Summary: Panel for the Flask Debug toolbar to capture and view line-by-line profiling stats
51Summary(pl.UTF-8): Pandel do Flask Debug toolbar do analizy statystyk wykonania kodu linia po linii
52Group: Libraries/Python
53Requires: python3-modules
54
55%description -n python3-%{module}
56Panel for flask_debugtoolbar which enables the ability to view line
57profiling information from selected functions. The line profile
58information comes from the line_profiler module.
59
60%description -n python3-%{module} -l pl.UTF-8
61Panel dla flask_debugtoolbar który pozwala zobaczyć i zanalizować
62czasy wykonania linii wybranych funkcji. Informacje są pobierane z
63modułu line_profiler.
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 Flask-DebugToolbar-LineProfilerPanel-%{version}
35b83c75
MK
78# Until fixed upstream:
79sed -i 's/line-profiler>=1.0b3/line_profiler>=1.0/g' setup.py
3b3eae2e
MK
80
81%build
82%if %{with python2}
83%{__python} setup.py build --build-base build-2 %{?with_tests:test}
84%endif
85
86%if %{with python3}
87%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
88%endif
89
90%if %{with doc}
91cd docs
92%{__make} -j1 html
93rm -rf _build/html/_sources
94%endif
95
96%install
97rm -rf $RPM_BUILD_ROOT
98
99%if %{with python2}
100%{__python} setup.py \
101 build --build-base build-2 \
102 install --skip-build \
103 --optimize=2 \
104 --root=$RPM_BUILD_ROOT
105
106%py_postclean
107%endif
108
109%if %{with python3}
110%{__python3} setup.py \
111 build --build-base build-3 \
112 install --skip-build \
113 --optimize=2 \
114 --root=$RPM_BUILD_ROOT
115%endif
116
117%clean
118rm -rf $RPM_BUILD_ROOT
119
120%if %{with python2}
121%files
122%defattr(644,root,root,755)
123%{py_sitescriptdir}/flask_debugtoolbar_lineprofilerpanel
124%if "%{py_ver}" > "2.4"
125%{py_sitescriptdir}/Flask_DebugToolbar_LineProfilerPanel-%{version}-py*.egg-info
126%endif
127%endif
128
129%if %{with python3}
130%files -n python3-%{module}
131%defattr(644,root,root,755)
132%{py3_sitescriptdir}/flask_debugtoolbar_lineprofilerpanel
133%{py3_sitescriptdir}/Flask_DebugToolbar_LineProfilerPanel-%{version}-py*.egg-info
134%endif
135
136%if %{with doc}
137%files apidocs
138%defattr(644,root,root,755)
139%doc docs/_build/html/*
140%endif
This page took 0.086261 seconds and 4 git commands to generate.