Upstream 10.1
add python3 support Package will be built when itsdangerous will be imported (new dependency)
This commit is contained in:
parent
f4ad2ae591
commit
6967c5f757
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ results_*
|
|||||||
/Flask-0.8.tar.gz
|
/Flask-0.8.tar.gz
|
||||||
/Flask-0.8.1.tar.gz
|
/Flask-0.8.1.tar.gz
|
||||||
/Flask-0.9.tar.gz
|
/Flask-0.9.tar.gz
|
||||||
|
/Flask-0.10.1.tar.gz
|
||||||
|
|||||||
@ -1,9 +1,15 @@
|
|||||||
|
%if 0%{?fedora} > 12
|
||||||
|
%global with_python3 1
|
||||||
|
%else
|
||||||
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
||||||
|
%endif
|
||||||
|
|
||||||
%global srcname Flask
|
%global srcname Flask
|
||||||
%global srcversion 0.9
|
%global srcversion 0.10.1
|
||||||
|
|
||||||
Name: python-flask
|
Name: python-flask
|
||||||
Version: 0.9
|
Version: 0.10.1
|
||||||
Release: 6%{?dist}
|
Release: 1%{?dist}
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: A micro-framework for Python based on Werkzeug, Jinja 2 and good intentions
|
Summary: A micro-framework for Python based on Werkzeug, Jinja 2 and good intentions
|
||||||
|
|
||||||
@ -13,19 +19,21 @@ URL: http://flask.pocoo.org/
|
|||||||
Source0: http://pypi.python.org/packages/source/F/Flask/%{srcname}-%{srcversion}.tar.gz
|
Source0: http://pypi.python.org/packages/source/F/Flask/%{srcname}-%{srcversion}.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel python-setuptools-devel python-werkzeug python-sphinx
|
BuildRequires: python2-devel python-setuptools python-werkzeug python-sphinx
|
||||||
Requires: python-werkzeug python-sphinx
|
Requires: python-werkzeug python-sphinx
|
||||||
|
|
||||||
%if 0%{?rhel}
|
%if 0%{?rhel}
|
||||||
BuildRequires: python-jinja2-26
|
BuildRequires: python-jinja2-26
|
||||||
|
BuildRequires: python-itsdangerous
|
||||||
Requires: python-jinja2-26
|
Requires: python-jinja2-26
|
||||||
|
Requires: python-itsdangerous
|
||||||
%else
|
%else
|
||||||
BuildRequires: python-jinja2
|
BuildRequires: python-jinja2
|
||||||
|
BuildRequires: python-itsdangerous
|
||||||
Requires: python-jinja2
|
Requires: python-jinja2
|
||||||
|
Requires: python-itsdangerosu
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Flask is called a “micro-framework” because the idea to keep the core
|
Flask is called a “micro-framework” because the idea to keep the core
|
||||||
simple but extensible. There is no database abstraction layer, no form
|
simple but extensible. There is no database abstraction layer, no form
|
||||||
@ -37,23 +45,70 @@ relational mappers, form validation, upload handling, various open
|
|||||||
authentication technologies and more.
|
authentication technologies and more.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for %{name}
|
Summary: Documentation for %{name}
|
||||||
Group: Documentation
|
Group: Documentation
|
||||||
Requires: %{name} = %{epoch}:%{version}-%{release}
|
Requires: %{name} = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
Documentation and examples for %{name}.
|
Documentation and examples for %{name}.
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%package -n python3-flask
|
||||||
|
Summary: A micro-framework for Python based on Werkzeug, Jinja 2 and good intentions
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
BuildRequires: python3-jinja2
|
||||||
|
BuildRequires: python3-werkzeug
|
||||||
|
BuildRequires: python3-sphinx
|
||||||
|
BuildRequires: python3-itsdangerous
|
||||||
|
Requires: python3-jinja2
|
||||||
|
Requires: python3-werkzeug
|
||||||
|
Requires: python3-sphinx
|
||||||
|
Requires: python3-itsdangerous
|
||||||
|
|
||||||
|
%description -n python3-flask
|
||||||
|
Flask is called a “micro-framework” because the idea to keep the core
|
||||||
|
simple but extensible. There is no database abstraction layer, no form
|
||||||
|
validation or anything else where different libraries already exist
|
||||||
|
that can handle that. However Flask knows the concept of extensions
|
||||||
|
that can add this functionality into your application as if it was
|
||||||
|
implemented in Flask itself. There are currently extensions for object
|
||||||
|
relational mappers, form validation, upload handling, various open
|
||||||
|
authentication technologies and more.
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python3-flask-doc
|
||||||
|
Summary: Documentation for python3-flask
|
||||||
|
Group: Documentation
|
||||||
|
Requires: python3-flask = %{epoch}:%{version}-%{release}
|
||||||
|
|
||||||
|
%description -n python3-flask-doc
|
||||||
|
Documentation and examples for python3-flask.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{srcversion}
|
%setup -q -n %{srcname}-%{srcversion}
|
||||||
%{__sed} -i "1i __requires__ = ['Jinja2>=2.4']" setup.py
|
%{__sed} -i "/platforms/ a\ requires=['Jinja2 (>=2.4)']," setup.py
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
rm -rf %{py3dir}
|
||||||
|
cp -a . %{py3dir}
|
||||||
|
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{__python} setup.py build
|
%{__python} setup.py build
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py build
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
|
||||||
@ -71,9 +126,37 @@ rm -rf examples/minitwit/*.pyc
|
|||||||
rm -rf examples/flaskr/*.pyc
|
rm -rf examples/flaskr/*.pyc
|
||||||
rm -rf examples/jqueryexample/*.pyc
|
rm -rf examples/jqueryexample/*.pyc
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
|
||||||
|
# Need to install flask in the setuptools "develop" mode to build docs
|
||||||
|
# The BuildRequires on Werkzeug, Jinja2 and Sphinx is due to this as well.
|
||||||
|
export PYTHONPATH=%{buildroot}%{python3_sitelib}
|
||||||
|
%{__python3} setup.py develop --install-dir %{buildroot}%{python3_sitelib}
|
||||||
|
make -C docs html
|
||||||
|
|
||||||
|
rm -rf %{buildroot}%{python3_sitelib}/site.py
|
||||||
|
rm -rf %{buildroot}%{python3_sitelib}/site.py[co]
|
||||||
|
rm -rf %{buildroot}%{python3_sitelib}/easy-install.pth
|
||||||
|
rm -rf docs/_build/html/.buildinfo
|
||||||
|
rm -rf examples/minitwit/*.pyc
|
||||||
|
rm -rf examples/flaskr/*.pyc
|
||||||
|
rm -rf examples/jqueryexample/*.pyc
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{__python} setup.py test
|
%{__python} setup.py test
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
pushd %{py3dir}
|
||||||
|
%{__python3} setup.py test
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc AUTHORS LICENSE PKG-INFO CHANGES README
|
%doc AUTHORS LICENSE PKG-INFO CHANGES README
|
||||||
%{python_sitelib}/*.egg-info
|
%{python_sitelib}/*.egg-info
|
||||||
@ -83,11 +166,26 @@ rm -rf examples/jqueryexample/*.pyc
|
|||||||
%files doc
|
%files doc
|
||||||
%doc docs/_build/html examples
|
%doc docs/_build/html examples
|
||||||
|
|
||||||
|
%if 0%{?with_python3}
|
||||||
|
%files -n python3-flask
|
||||||
|
%doc AUTHORS LICENSE PKG-INFO CHANGES README
|
||||||
|
%{python3_sitelib}/*.egg-info
|
||||||
|
%{python3_sitelib}/*.egg-link
|
||||||
|
%{python3_sitelib}/flask
|
||||||
|
|
||||||
|
%files -n python3-flask-doc
|
||||||
|
%doc docs/_build/html examples
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jun 15 2013 Haïkel Guémar <hguemar@fedoraproject.org> - 1:0.10.1-1
|
||||||
|
- upstream 0.10.1
|
||||||
|
|
||||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.9-6
|
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:0.9-6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||||
|
|
||||||
* Wed Aug 17 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.9-5
|
* Fri Aug 17 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.9-5
|
||||||
- Add epoch to subpackage Requires.
|
- Add epoch to subpackage Requires.
|
||||||
|
|
||||||
* Wed Aug 8 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.9-4
|
* Wed Aug 8 2012 Ricky Elrod <codeblock@fedoraproject.org> - 0.9-4
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user