]> git.pld-linux.org Git - packages/python-flask-debugtoolbar-lineprofilerpanel.git/blob - python-flask-debugtoolbar-lineprofilerpanel.spec
25f4eecb01b7b6d4b6a2eebd49319bb0c6a22c98
[packages/python-flask-debugtoolbar-lineprofilerpanel.git] / python-flask-debugtoolbar-lineprofilerpanel.spec
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
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}
12 Version:        1.0.2
13 Release:        3
14 License:        MIT
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:  rpm-pythonprov
20 %if %{with python2}
21 BuildRequires:  python-distribute
22 BuildRequires:  python-flask-debugtoolbar
23 BuildRequires:  python-line_profiler
24
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-distribute
28 BuildRequires:  python3-flask-debugtoolbar
29 BuildRequires:  python3-line_profiler
30 BuildRequires:  python3-modules
31
32 %endif
33 # Below Rs only work for main package (python2)
34 #Requires:              python-libs
35 Requires:       python-modules
36 BuildArch:      noarch
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %description
40 Panel for flask_debugtoolbar which enables the ability to view line
41 profiling information from selected functions. The line profile
42 information comes from the line_profiler module.
43
44 %description -l pl.UTF-8
45 Panel dla flask_debugtoolbar który pozwala zobaczyć i zanalizować
46 czasy wykonania linii wybranych funkcji. Informacje są pobierane z
47 modułu line_profiler.
48
49 %package -n python3-%{module}
50 Summary:        Panel for the Flask Debug toolbar to capture and view line-by-line profiling stats
51 Summary(pl.UTF-8):      Pandel do Flask Debug toolbar do analizy statystyk wykonania kodu linia po linii
52 Group:          Libraries/Python
53 Requires:       python3-modules
54
55 %description -n python3-%{module}
56 Panel for flask_debugtoolbar which enables the ability to view line
57 profiling information from selected functions. The line profile
58 information comes from the line_profiler module.
59
60 %description -n python3-%{module} -l pl.UTF-8
61 Panel dla flask_debugtoolbar który pozwala zobaczyć i zanalizować
62 czasy wykonania linii wybranych funkcji. Informacje są pobierane z
63 modułu line_profiler.
64
65 %package apidocs
66 Summary:        %{module} API documentation
67 Summary(pl.UTF-8):      Dokumentacja API %{module}
68 Group:          Documentation
69
70 %description apidocs
71 API documentation for %{module}.
72
73 %description apidocs -l pl.UTF-8
74 Dokumentacja API %{module}.
75
76 %prep
77 %setup -q -n Flask-DebugToolbar-LineProfilerPanel-%{version}
78 # Until fixed upstream: 
79 sed -i 's/line-profiler>=1.0b3/line_profiler>=1.0/g' setup.py
80
81 %build
82 %if %{with python2}
83 %py_build %{?with_tests:test}
84 %endif
85
86 %if %{with python3}
87 %py3_build %{?with_tests:test}
88 %endif
89
90 %if %{with doc}
91 cd docs
92 %{__make} -j1 html
93 rm -rf _build/html/_sources
94 %endif
95
96 %install
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with python2}
100 %py_install
101
102 %py_postclean
103 %endif
104
105 %if %{with python3}
106 %py3_install
107 %endif
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %if %{with python2}
113 %files
114 %defattr(644,root,root,755)
115 %{py_sitescriptdir}/flask_debugtoolbar_lineprofilerpanel
116 %if "%{py_ver}" > "2.4"
117 %{py_sitescriptdir}/Flask_DebugToolbar_LineProfilerPanel-%{version}-py*.egg-info
118 %endif
119 %endif
120
121 %if %{with python3}
122 %files -n python3-%{module}
123 %defattr(644,root,root,755)
124 %{py3_sitescriptdir}/flask_debugtoolbar_lineprofilerpanel
125 %{py3_sitescriptdir}/Flask_DebugToolbar_LineProfilerPanel-%{version}-py*.egg-info
126 %endif
127
128 %if %{with doc}
129 %files apidocs
130 %defattr(644,root,root,755)
131 %doc docs/_build/html/*
132 %endif
This page took 0.084195 seconds and 2 git commands to generate.