]> git.pld-linux.org Git - packages/python3-flask.git/blame - python-flask.spec
- release 3 (by relup.sh)
[packages/python3-flask.git] / python-flask.spec
CommitLineData
21189e0f
MK
1#
2# Conditional build:
68354320
JB
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
21189e0f
MK
7
8%define module flask
9Summary: A microframework based on Werkzeug, Jinja2 and good intentions
68354320 10Summary(pl.UTF-8): Mikroszkielet oparty na Werkzeugu, Jinja2 i dobrych intencjach
21189e0f 11Name: python-%{module}
590f22ae 12Version: 1.0.2
bab80cd0 13Release: 3
21189e0f
MK
14License: BSD
15Group: Development/Languages/Python
68354320
JB
16#Source0Download: https://pypi.python.org/simple/Flask
17Source0: https://files.pythonhosted.org/packages/source/F/Flask/Flask-%{version}.tar.gz
590f22ae
AM
18# Source0-md5: 824f0f20aae1f44c9c7dc4054adb7969
19Patch0: 0001-Don-t-require-sphinxcontrib.log_cabinet-extension.patch
20Patch1: 0002-remove-DocVersion-related.patch
21Patch2: 0003-fix-issue-no-theme-named-flask-found.patch
22Patch3: 0004-empty-CONTRIBUTING-rst.patch
21189e0f 23URL: http://flask.pocoo.org/
68354320
JB
24%if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?)
25BuildRequires: glibc-localedb-all
26%endif
21189e0f 27%if %{with python2}
68354320
JB
28BuildRequires: python-click >= 2.0
29BuildRequires: python-devel >= 1:2.6
30BuildRequires: python-itsdangerous >= 0.21
21189e0f 31BuildRequires: python-jinja2 >= 2.4
68354320
JB
32BuildRequires: python-modules >= 1:2.6
33BuildRequires: python-pytest
34BuildRequires: python-setuptools
35BuildRequires: python-werkzeug >= 0.7
21189e0f
MK
36%endif
37%if %{with python3}
68354320
JB
38BuildRequires: python3-click >= 2.0
39BuildRequires: python3-devel >= 1:3.3
40BuildRequires: python3-itsdangerous >= 0.21
21189e0f 41BuildRequires: python3-jinja2 >= 2.4
68354320
JB
42BuildRequires: python3-modules >= 1:3.3
43BuildRequires: python3-pytest
44BuildRequires: python3-setuptools
45BuildRequires: python3-werkzeug >= 0.7
21189e0f 46%endif
68354320
JB
47%if %{with doc}
48BuildRequires: sphinx-pdg
49%endif
50BuildRequires: rpm-pythonprov
51BuildRequires: rpmbuild(macros) >= 1.714
52Requires: python-modules >= 1:2.6
21189e0f
MK
53BuildArch: noarch
54BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
55
56%description
57Flask is a microframework for Python based on Werkzeug, Jinja 2 and
58good intentions.
59
68354320
JB
60%description -l pl.UTF-8
61Flask to mikroszkielet dla Pythona oparty na modułach Werkzeug i
62Jinja2 oraz dobrych intencjach.
63
21189e0f 64%package -n python3-%{module}
68354320
JB
65Summary: A microframework based on Werkzeug, Jinja2 and good intentions
66Summary(pl.UTF-8): Mikroszkielet oparty na Werkzeugu, Jinja2 i dobrych intencjach
21189e0f 67Group: Libraries/Python
68354320 68Requires: python3-modules >= 1:3.3
21189e0f
MK
69
70%description -n python3-%{module}
71Flask is a microframework for Python based on Werkzeug, Jinja 2 and
72good intentions.
73
68354320
JB
74%description -n python3-%{module} -l pl.UTF-8
75Flask to mikroszkielet dla Pythona oparty na modułach Werkzeug i
76Jinja2 oraz dobrych intencjach.
77
78%package apidocs
79Summary: Documentation for Python Flask package
80Summary(pl.UTF-8): Dokumentacja do pakietu Pythona Flask
81Group: Documentation
21189e0f 82
68354320
JB
83%description apidocs
84Documentation for Python Flask package.
85
86%description apidocs -l pl.UTF-8
87Dokumentacja do pakietu Pythona Flask.
21189e0f
MK
88
89%prep
90%setup -q -n Flask-%{version}
68354320 91%patch0 -p1
590f22ae
AM
92%patch1 -p1
93%patch2 -p1
94%patch3 -p1
21189e0f
MK
95
96%build
97%if %{with python2}
68354320
JB
98%py_build
99
100%{?with_tests:%{__python} -m pytest tests}
21189e0f
MK
101%endif
102
103%if %{with python3}
68354320
JB
104%py3_build
105
106%{?with_tests:LC_ALL=C.UTF-8 %{__python3} -m pytest tests}
107%endif
108
109%if %{with doc}
110PYTHONPATH=$(pwd) \
111%{__make} -C docs html
21189e0f
MK
112%endif
113
114%install
115rm -rf $RPM_BUILD_ROOT
116
68354320
JB
117%if %{with python3}
118%py3_install
119
120%{__mv} $RPM_BUILD_ROOT%{_bindir}/flask{,-3}
121
122install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
123cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
124%endif
125
21189e0f 126%if %{with python2}
bb76c6e5 127%py_install
21189e0f
MK
128
129%py_postclean
21189e0f 130
68354320
JB
131%{__mv} $RPM_BUILD_ROOT%{_bindir}/flask{,-2}
132ln -sf flask-2 $RPM_BUILD_ROOT%{_bindir}/flask
21189e0f 133
21189e0f
MK
134install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
135cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
136%endif
21189e0f
MK
137
138%clean
139rm -rf $RPM_BUILD_ROOT
140
141%if %{with python2}
142%files
143%defattr(644,root,root,755)
590f22ae 144%doc AUTHORS CHANGES.rst LICENSE README.rst
68354320
JB
145%attr(755,root,root) %{_bindir}/flask
146%attr(755,root,root) %{_bindir}/flask-2
147%{py_sitescriptdir}/flask
21189e0f 148%if "%{py_ver}" > "2.4"
68354320 149%{py_sitescriptdir}/Flask-%{version}-py*.egg-info
21189e0f
MK
150%endif
151%{_examplesdir}/%{name}-%{version}
152%endif
153
154%if %{with python3}
155%files -n python3-%{module}
156%defattr(644,root,root,755)
590f22ae 157%doc AUTHORS CHANGES.rst LICENSE README.rst
68354320
JB
158%attr(755,root,root) %{_bindir}/flask-3
159%{py3_sitescriptdir}/flask
21189e0f
MK
160%{py3_sitescriptdir}/Flask-%{version}-py*.egg-info
161%{_examplesdir}/python3-%{module}-%{version}
162%endif
68354320
JB
163
164%if %{with doc}
165%files apidocs
166%defattr(644,root,root,755)
167%doc docs/_build/html/{_images,_static,deploying,patterns,tutorial,*.html,*.js}
168%endif
This page took 0.174686 seconds and 4 git commands to generate.