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