]> git.pld-linux.org Git - packages/python-flask-debugtoolbar.git/blob - python-flask-debugtoolbar.spec
1d92891c90223cb1360f301fd0004a99947f9502
[packages/python-flask-debugtoolbar.git] / python-flask-debugtoolbar.spec
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  flask-debugtoolbar
9 Summary:        A port of the Django debug toolbar to Flask
10 Summary(pl.UTF-8):      Odpowiednik Djangowego debuggera dla Flask
11 Name:           python-%{module}
12 Version:        0.9.0
13 Release:        7
14 License:        BSD
15 Group:          Libraries/Python
16 Source0:        https://pypi.python.org/packages/source/F/Flask-DebugToolbar/Flask-DebugToolbar-%{version}.tar.gz
17 # Source0-md5:  b471c8320d9a04ffea3abda020570563
18 URL:            http://flask-debugtoolbar.rtfd.org/
19 BuildRequires:  rpm-pythonprov
20 # if py_postclean is used
21 BuildRequires:  rpmbuild(macros) >= 1.710
22 %if %{with python2}
23 BuildRequires:  python-blinker
24 BuildRequires:  python-distribute
25 %endif
26 %if %{with python3}
27 BuildRequires:  python3-blinker
28 BuildRequires:  python3-modules
29 %endif
30 # Below Rs only work for main package (python2)
31 #Requires:              python-libs
32 Requires:       python-modules
33 Requires:       python-devel-tools
34 BuildArch:      noarch
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %description
38 A port of the Django debug toolbar to Flask
39
40 ## %description -l pl.UTF-8
41
42 %package -n python3-%{module}
43 Summary:        -
44 Summary(pl.UTF-8):      -
45 Group:          Libraries/Python
46 Requires:       python3-modules
47 Requires:       python3-devel-tools
48
49 %description -n python3-%{module}
50 A port of the Django debug toolbar to Flask
51
52 ## %description -n python3-%{module} -l pl.UTF-8
53
54 %package apidocs
55 Summary:        %{module} API documentation
56 Summary(pl.UTF-8):      Dokumentacja API %{module}
57 Group:          Documentation
58
59 %description apidocs
60 API documentation for %{module}.
61
62 %description apidocs -l pl.UTF-8
63 Dokumentacja API %{module}.
64
65 %prep
66 %setup -q -n Flask-DebugToolbar-%{version}
67
68 %build
69 %if %{with python2}
70 %py_build %{?with_tests:test}
71 %endif
72
73 %if %{with python3}
74 %py3_build %{?with_tests:test}
75 %endif
76
77 %if %{with doc}
78 cd docs
79 %{__make} -j1 html
80 rm -rf _build/html/_sources
81 %endif
82
83 %install
84 rm -rf $RPM_BUILD_ROOT
85
86 %if %{with python2}
87 %py_install
88
89 %py_postclean
90 %endif
91
92 %if %{with python3}
93 %py3_install
94 %endif
95
96 %clean
97 rm -rf $RPM_BUILD_ROOT
98
99 %if %{with python2}
100 %files
101 %defattr(644,root,root,755)
102 %{py_sitescriptdir}/flask_debugtoolbar
103 %if "%{py_ver}" > "2.4"
104 %{py_sitescriptdir}/Flask_DebugToolbar-%{version}-py*.egg-info
105 %endif
106 %endif
107
108 %if %{with python3}
109 %files -n python3-%{module}
110 %defattr(644,root,root,755)
111 %{py3_sitescriptdir}/flask_debugtoolbar
112 %{py3_sitescriptdir}/Flask_DebugToolbar-%{version}-py*.egg-info
113 %endif
114
115 %if %{with doc}
116 %files apidocs
117 %defattr(644,root,root,755)
118 %doc docs/_build/html/*
119 %endif
This page took 0.072898 seconds and 2 git commands to generate.