]> git.pld-linux.org Git - packages/python-flask-debugtoolbar.git/blob - python-flask-debugtoolbar.spec
ddec7f3e19aef37d23a4087e6ccb9ecd2aef723f
[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-distribute
29 BuildRequires:  python3-modules
30 %endif
31 # Below Rs only work for main package (python2)
32 #Requires:              python-libs
33 Requires:       python-modules
34 Requires:       python-devel-tools
35 BuildArch:      noarch
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 A port of the Django debug toolbar to Flask
40
41 ## %description -l pl.UTF-8
42
43 %package -n python3-%{module}
44 Summary:        -
45 Summary(pl.UTF-8):      -
46 Group:          Libraries/Python
47 Requires:       python3-modules
48 Requires:       python3-devel-tools
49
50 %description -n python3-%{module}
51 A port of the Django debug toolbar to Flask
52
53 ## %description -n python3-%{module} -l pl.UTF-8
54
55 %package apidocs
56 Summary:        %{module} API documentation
57 Summary(pl.UTF-8):      Dokumentacja API %{module}
58 Group:          Documentation
59
60 %description apidocs
61 API documentation for %{module}.
62
63 %description apidocs -l pl.UTF-8
64 Dokumentacja API %{module}.
65
66 %prep
67 %setup -q -n Flask-DebugToolbar-%{version}
68
69 %build
70 %if %{with python2}
71 %py_build %{?with_tests:test}
72 %endif
73
74 %if %{with python3}
75 %py3_build %{?with_tests:test}
76 %endif
77
78 %if %{with doc}
79 cd docs
80 %{__make} -j1 html
81 rm -rf _build/html/_sources
82 %endif
83
84 %install
85 rm -rf $RPM_BUILD_ROOT
86
87 %if %{with python2}
88 %py_install
89
90 %py_postclean
91 %endif
92
93 %if %{with python3}
94 %py3_install
95 %endif
96
97 %clean
98 rm -rf $RPM_BUILD_ROOT
99
100 %if %{with python2}
101 %files
102 %defattr(644,root,root,755)
103 %{py_sitescriptdir}/flask_debugtoolbar
104 %if "%{py_ver}" > "2.4"
105 %{py_sitescriptdir}/Flask_DebugToolbar-%{version}-py*.egg-info
106 %endif
107 %endif
108
109 %if %{with python3}
110 %files -n python3-%{module}
111 %defattr(644,root,root,755)
112 %{py3_sitescriptdir}/flask_debugtoolbar
113 %{py3_sitescriptdir}/Flask_DebugToolbar-%{version}-py*.egg-info
114 %endif
115
116 %if %{with doc}
117 %files apidocs
118 %defattr(644,root,root,755)
119 %doc docs/_build/html/*
120 %endif
This page took 0.062958 seconds and 2 git commands to generate.