|
|
5974bf |
%if 0%{?fedora} > 12
|
|
|
5974bf |
%global with_python3 1
|
|
|
5974bf |
%else
|
|
|
5974bf |
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
5974bf |
%endif
|
|
|
5974bf |
|
|
|
5974bf |
%global srcname Flask
|
|
|
5974bf |
%global srcversion 0.10.1
|
|
|
5974bf |
|
|
|
5974bf |
Name: python-flask
|
|
|
5974bf |
Version: 0.10.1
|
|
|
5974bf |
Release: 4%{?dist}
|
|
|
5974bf |
Epoch: 1
|
|
|
5974bf |
Summary: A micro-framework for Python based on Werkzeug, Jinja 2 and good intentions
|
|
|
5974bf |
|
|
|
5974bf |
Group: Development/Libraries
|
|
|
5974bf |
License: BSD
|
|
|
5974bf |
URL: http://flask.pocoo.org/
|
|
|
5974bf |
Source0: http://pypi.python.org/packages/source/F/Flask/%{srcname}-%{srcversion}.tar.gz
|
|
|
5974bf |
|
|
|
5974bf |
BuildArch: noarch
|
|
|
5974bf |
BuildRequires: python2-devel python-setuptools python-werkzeug python-sphinx
|
|
|
5974bf |
Requires: python-werkzeug
|
|
|
5974bf |
|
|
|
5974bf |
%if 0%{?rhel} < 7
|
|
|
5974bf |
BuildRequires: python-jinja2
|
|
|
5974bf |
BuildRequires: python-itsdangerous
|
|
|
5974bf |
Requires: python-jinja2
|
|
|
5974bf |
Requires: python-itsdangerous
|
|
|
5974bf |
%else
|
|
|
5974bf |
BuildRequires: python-jinja2
|
|
|
5974bf |
BuildRequires: python-itsdangerous
|
|
|
5974bf |
Requires: python-jinja2
|
|
|
5974bf |
Requires: python-itsdangerous
|
|
|
5974bf |
%endif
|
|
|
5974bf |
|
|
|
5974bf |
%description
|
|
|
5974bf |
Flask is called a “micro-framework” because the idea to keep the core
|
|
|
5974bf |
simple but extensible. There is no database abstraction layer, no form
|
|
|
5974bf |
validation or anything else where different libraries already exist
|
|
|
5974bf |
that can handle that. However Flask knows the concept of extensions
|
|
|
5974bf |
that can add this functionality into your application as if it was
|
|
|
5974bf |
implemented in Flask itself. There are currently extensions for object
|
|
|
5974bf |
relational mappers, form validation, upload handling, various open
|
|
|
5974bf |
authentication technologies and more.
|
|
|
5974bf |
|
|
|
5974bf |
|
|
|
5974bf |
%package doc
|
|
|
5974bf |
Summary: Documentation for %{name}
|
|
|
5974bf |
Group: Documentation
|
|
|
5974bf |
Requires: %{name} = %{epoch}:%{version}-%{release}
|
|
|
5974bf |
|
|
|
5974bf |
%description doc
|
|
|
5974bf |
Documentation and examples for %{name}.
|
|
|
5974bf |
|
|
|
5974bf |
%if 0%{?with_python3}
|
|
|
5974bf |
%package -n python3-flask
|
|
|
5974bf |
Summary: A micro-framework for Python based on Werkzeug, Jinja 2 and good intentions
|
|
|
5974bf |
BuildRequires: python3-devel
|
|
|
5974bf |
BuildRequires: python3-setuptools
|
|
|
5974bf |
BuildRequires: python3-jinja2
|
|
|
5974bf |
BuildRequires: python3-werkzeug
|
|
|
5974bf |
#BuildRequires: python3-sphinx
|
|
|
5974bf |
BuildRequires: python3-itsdangerous
|
|
|
5974bf |
Requires: python3-jinja2
|
|
|
5974bf |
Requires: python3-werkzeug
|
|
|
5974bf |
Requires: python3-itsdangerous
|
|
|
5974bf |
|
|
|
5974bf |
%description -n python3-flask
|
|
|
5974bf |
Flask is called a “micro-framework” because the idea to keep the core
|
|
|
5974bf |
simple but extensible. There is no database abstraction layer, no form
|
|
|
5974bf |
validation or anything else where different libraries already exist
|
|
|
5974bf |
that can handle that. However Flask knows the concept of extensions
|
|
|
5974bf |
that can add this functionality into your application as if it was
|
|
|
5974bf |
implemented in Flask itself. There are currently extensions for object
|
|
|
5974bf |
relational mappers, form validation, upload handling, various open
|
|
|
5974bf |
authentication technologies and more.
|
|
|
5974bf |
|
|
|
5974bf |
|
|
|
5974bf |
%package -n python3-flask-doc
|
|
|
5974bf |
Summary: Documentation for python3-flask
|
|
|
5974bf |
Group: Documentation
|
|
|
5974bf |
Requires: python3-flask = %{epoch}:%{version}-%{release}
|
|
|
5974bf |
|
|
|
5974bf |
%description -n python3-flask-doc
|
|
|
5974bf |
Documentation and examples for python3-flask.
|
|
|
5974bf |
%endif
|
|
|
5974bf |
|
|
|
5974bf |
|
|
|
5974bf |
%prep
|
|
|
5974bf |
%setup -q -n %{srcname}-%{srcversion}
|
|
|
5974bf |
%{__sed} -i "/platforms/ a\ requires=['Jinja2 (>=2.4)']," setup.py
|
|
|
5974bf |
|
|
|
5974bf |
%if 0%{?with_python3}
|
|
|
5974bf |
rm -rf %{py3dir}
|
|
|
5974bf |
cp -a . %{py3dir}
|
|
|
5974bf |
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
|
|
5974bf |
%endif
|
|
|
5974bf |
|
|
|
5974bf |
|
|
|
5974bf |
%build
|
|
|
5974bf |
%{__python} setup.py build
|
|
|
5974bf |
|
|
|
5974bf |
%if 0%{?with_python3}
|
|
|
5974bf |
pushd %{py3dir}
|
|
|
5974bf |
%{__python3} setup.py build
|
|
|
5974bf |
popd
|
|
|
5974bf |
%endif
|
|
|
5974bf |
|
|
|
5974bf |
|
|
|
5974bf |
%install
|
|
|
5974bf |
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
5974bf |
|
|
|
5974bf |
# Need to install flask in the setuptools "develop" mode to build docs
|
|
|
5974bf |
# The BuildRequires on Werkzeug, Jinja2 and Sphinx is due to this as well.
|
|
|
5974bf |
export PYTHONPATH=%{buildroot}%{python_sitelib}
|
|
|
5974bf |
%{__python} setup.py develop --install-dir %{buildroot}%{python_sitelib}
|
|
|
5974bf |
make -C docs html
|
|
|
5974bf |
|
|
|
5974bf |
rm -rf %{buildroot}%{python_sitelib}/site.py
|
|
|
5974bf |
rm -rf %{buildroot}%{python_sitelib}/site.py[co]
|
|
|
5974bf |
rm -rf %{buildroot}%{python_sitelib}/easy-install.pth
|
|
|
5974bf |
rm -rf docs/_build/html/.buildinfo
|
|
|
5974bf |
rm -rf examples/minitwit/*.pyc
|
|
|
5974bf |
rm -rf examples/flaskr/*.pyc
|
|
|
5974bf |
rm -rf examples/jqueryexample/*.pyc
|
|
|
5974bf |
|
|
|
5974bf |
%if 0%{?with_python3}
|
|
|
5974bf |
pushd %{py3dir}
|
|
|
5974bf |
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
5974bf |
|
|
|
5974bf |
# Need to install flask in the setuptools "develop" mode to build docs
|
|
|
5974bf |
# The BuildRequires on Werkzeug, Jinja2 and Sphinx is due to this as well.
|
|
|
5974bf |
export PYTHONPATH=%{buildroot}%{python3_sitelib}
|
|
|
5974bf |
%{__python3} setup.py develop --install-dir %{buildroot}%{python3_sitelib}
|
|
|
5974bf |
#make -C docs html
|
|
|
5974bf |
|
|
|
5974bf |
rm -rf %{buildroot}%{python3_sitelib}/site.py
|
|
|
5974bf |
rm -rf %{buildroot}%{python3_sitelib}/site.py[co]
|
|
|
5974bf |
rm -rf %{buildroot}%{python3_sitelib}/easy-install.pth
|
|
|
5974bf |
rm -rf %{buildroot}%{python3_sitelib}/__pycache__/site.cpython-33.pyc
|
|
|
5974bf |
rm -rf docs/_build/html/.buildinfo
|
|
|
5974bf |
rm -rf examples/minitwit/*.pyc
|
|
|
5974bf |
rm -rf examples/flaskr/*.pyc
|
|
|
5974bf |
rm -rf examples/jqueryexample/*.pyc
|
|
|
5974bf |
popd
|
|
|
5974bf |
%endif
|
|
|
5974bf |
|
|
|
5974bf |
|
|
|
5974bf |
%check
|
|
|
5974bf |
#{__python} setup.py test
|
|
|
5974bf |
|
|
|
5974bf |
#if 0%{?with_python3}
|
|
|
5974bf |
#pushd %{py3dir}
|
|
|
5974bf |
#{__python3} setup.py test
|
|
|
5974bf |
#popd
|
|
|
5974bf |
#endif
|
|
|
5974bf |
|
|
|
5974bf |
|
|
|
5974bf |
%files
|
|
|
5974bf |
%doc AUTHORS LICENSE PKG-INFO CHANGES README
|
|
|
5974bf |
%{python_sitelib}/*.egg-info
|
|
|
5974bf |
%{python_sitelib}/*.egg-link
|
|
|
5974bf |
%{python_sitelib}/flask
|
|
|
5974bf |
|
|
|
5974bf |
%files doc
|
|
|
5974bf |
%doc docs/_build/html examples
|
|
|
5974bf |
|
|
|
5974bf |
%if 0%{?with_python3}
|
|
|
5974bf |
%files -n python3-flask
|
|
|
5974bf |
%doc AUTHORS LICENSE PKG-INFO CHANGES README
|
|
|
5974bf |
%{python3_sitelib}/*.egg-info
|
|
|
5974bf |
%{python3_sitelib}/*.egg-link
|
|
|
5974bf |
%{python3_sitelib}/flask
|
|
|
5974bf |
|
|
|
5974bf |
%files -n python3-flask-doc
|
|
|
5974bf |
%doc docs/_build/html examples
|
|
|
5974bf |
%endif
|
|
|
5974bf |
|
|
|
5974bf |
|
|
|
5974bf |
%changelog
|
|
|
5974bf |
* Tue Apr 29 2014 Lokesh Mandvekar <lsm5@redhat.com> - 1:0.10.1-4
|
|
|
5974bf |
- Rebuilt for RHEL 7
|
|
|
5974bf |
- tests disabled
|
|
|
5974bf |
|
|
|
5974bf |
* Mon Jul 29 2013 Haïkel Guémar <hguemar@fedoraproject.org> - 1:0.10.1-3
|
|
|
5974bf |
- fix wrong requires on sphinx (RHBZ #989361)
|
|
|
5974bf |
|
|
|
5974bf |
* Sat Jul 20 2013 Ricky Elrod <codeblock@fedoraproject.org> - 1:0.10.1-2
|
|
|
5974bf |
- Nuke a Python3 specific file owned by python3-setuptools.
|
|
|
5974bf |
|
|
|
5974bf |
* Sat Jun 15 2013 Haïkel Guémar <hguemar@fedoraproject.org> - 1:0.10.1-1
|
|
|
5974bf |
- upstream 0.10.1
|
|
|
5974bf |
|
|
|
5974bf |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.9-6
|
|
|
5974bf |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
5974bf |
|
|
|
5974bf |
* Fri Aug 17 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.9-5
|
|
|
5974bf |
- Add epoch to subpackage Requires.
|
|
|
5974bf |
|
|
|
5974bf |
* Wed Aug 8 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.9-4
|
|
|
5974bf |
- Fix changelog messup.
|
|
|
5974bf |
|
|
|
5974bf |
* Wed Aug 8 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.9-3
|
|
|
5974bf |
- Unified spec for EL6 and Fedora
|
|
|
5974bf |
|
|
|
5974bf |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.0-2
|
|
|
5974bf |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
5974bf |
|
|
|
5974bf |
* Mon Jul 2 2012 Haïkel Guémar <hguemar@fedoraproject.org> - 0.9.0-1
|
|
|
5974bf |
- upstream 0.9
|
|
|
5974bf |
- spec cleanups
|
|
|
5974bf |
|
|
|
5974bf |
* Sun Jul 1 2012 Haïkel Guémar <hguemar@fedoraproject.org> - 0.8.1-1
|
|
|
5974bf |
- upstream 0.8.1 (minor bugfixes)
|
|
|
5974bf |
|
|
|
5974bf |
* Wed Jan 25 2012 Haïkel Guémar <hguemar@fedoraproject.org> - 0.8.0-1
|
|
|
5974bf |
- upstream 0.8
|
|
|
5974bf |
|
|
|
5974bf |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-3
|
|
|
5974bf |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
5974bf |
|
|
|
5974bf |
* Wed Nov 16 2011 Dan Young <dyoung@mesd.k12.or.us> - 0.7.2-2
|
|
|
5974bf |
- don't own easy-install.pth
|
|
|
5974bf |
|
|
|
5974bf |
* Fri Jul 22 2011 Steve Milner <smilner@fedoraproject.org> - 0.7.2-1
|
|
|
5974bf |
- update for upstream release
|
|
|
5974bf |
|
|
|
5974bf |
* Thu Feb 24 2011 Dan Young <dyoung@mesd.k12.or.us> - 0.6.1-2
|
|
|
5974bf |
- fix rpmlint spelling warning
|
|
|
5974bf |
- BR python2-devel rather than python-devel
|
|
|
5974bf |
- run test suite in check
|
|
|
5974bf |
|
|
|
5974bf |
* Tue Feb 22 2011 Dan Young <dyoung@mesd.k12.or.us> - 0.6.1-1
|
|
|
5974bf |
- Initial package
|