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