Thomas Spura 29929f5
%if 0%{?fedora} > 12
Ionuț C. Arțăriși 06cf7a2
%global with_python3 1
Ionuț C. Arțăriși 06cf7a2
%else
Thomas Spura b53d761
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")}
Ionuț C. Arțăriși 06cf7a2
%endif
Ionuț C. Arțăriși 06cf7a2
Ionuț Arțăriși 837671b
%global pkgname tornado
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
Name:           python-%{pkgname}
Thomas Spura c4b78df
Version:        3.2.2
Thomas Spura c4b78df
Release:        1%{?dist}
Ionuț Arțăriși 837671b
Summary:        Scalable, non-blocking web server and tools
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
Group:          Development/Libraries
Ionuț Arțăriși 837671b
License:        ASL 2.0
Ionuț Arțăriși 837671b
URL:            http://www.tornadoweb.org
Thomas Spura 9f165ca
Source0:        https://pypi.python.org/packages/source/t/tornado/tornado-%{version}.tar.gz
Ionuț Arțăriși 837671b
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
BuildRequires:  python-devel
Thomas Spura 9f165ca
BuildRequires:  python-backports-ssl_match_hostname
Thomas Spura 9f165ca
Requires:       python-backports-ssl_match_hostname
Ionuț Arțăriși 837671b
Requires:       python-pycurl
Ionuț Arțăriși 837671b
Requires:       python-simplejson
Ionuț C. Arțăriși 06cf7a2
%if 0%{?with_python3}
Ionuț C. Arțăriși 06cf7a2
BuildRequires:  python-tools
Ionuț C. Arțăriși 06cf7a2
BuildRequires:  python3-setuptools
Ionuț C. Arțăriși 06cf7a2
BuildRequires:  python3-devel
Ionuț C. Arțăriși 06cf7a2
%endif
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
%description
Ionuț Arțăriși 48bc04e
Tornado is an open source version of the scalable, non-blocking web
Ionuț Arțăriși 48bc04e
server and tools.
Ionuț Arțăriși 837671b
Ionuț Arțăriși 48bc04e
The framework is distinct from most mainstream web server frameworks
Ionuț Arțăriși 48bc04e
(and certainly most Python frameworks) because it is non-blocking and
Ionuț Arțăriși 48bc04e
reasonably fast. Because it is non-blocking and uses epoll, it can
Ionuț Arțăriși 48bc04e
handle thousands of simultaneous standing connections, which means it is
Ionuț Arțăriși 48bc04e
ideal for real-time web services.
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
%package doc
Ionuț Arțăriși 837671b
Summary:        Examples for python-tornado
Ionuț Arțăriși 837671b
Group:          Documentation
Ionuț Arțăriși 837671b
Requires:       python-tornado = %{version}-%{release}
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
%description doc
Ionuț Arțăriși 3b7a9d3
Tornado is an open source version of the scalable, non-blocking web
Ionuț Arțăriși 3b7a9d3
server and and tools. This package contains some example applications.
Ionuț Arțăriși 837671b
Ionuț C. Arțăriși 06cf7a2
%if 0%{?with_python3}
Ionuț C. Arțăriși 06cf7a2
%package -n python3-tornado
Ionuț C. Arțăriși 06cf7a2
Summary:        Scalable, non-blocking web server and tools
Ionuț C. Arțăriși 06cf7a2
%description -n python3-tornado
Ionuț C. Arțăriși 06cf7a2
Tornado is an open source version of the scalable, non-blocking web
Ionuț C. Arțăriși 06cf7a2
server and tools.
Ionuț C. Arțăriși 06cf7a2
Ionuț C. Arțăriși 06cf7a2
The framework is distinct from most mainstream web server frameworks
Ionuț C. Arțăriși 06cf7a2
(and certainly most Python frameworks) because it is non-blocking and
Ionuț C. Arțăriși 06cf7a2
reasonably fast. Because it is non-blocking and uses epoll, it can
Ionuț C. Arțăriși 06cf7a2
handle thousands of simultaneous standing connections, which means it is
Ionuț C. Arțăriși 06cf7a2
ideal for real-time web services.
Ionuț C. Arțăriși 06cf7a2
Ionuț C. Arțăriși 06cf7a2
%package -n python3-tornado-doc
Ionuț C. Arțăriși 06cf7a2
Summary:        Examples for python-tornado
Ionuț C. Arțăriși 06cf7a2
Group:          Documentation
Ionuț C. Arțăriși 06cf7a2
Requires:       python3-tornado = %{version}-%{release}
Ionuț C. Arțăriși 06cf7a2
Ionuț C. Arțăriși 06cf7a2
%description -n python3-tornado-doc
Ionuț C. Arțăriși 06cf7a2
Tornado is an open source version of the scalable, non-blocking web
Ionuț C. Arțăriși 06cf7a2
server and and tools. This package contains some example applications.
Ionuț C. Arțăriși 06cf7a2
Ionuț C. Arțăriși 06cf7a2
%endif # with_python3
Ionuț C. Arțăriși 06cf7a2
Ionuț Arțăriși 837671b
%prep 
Ionuț Arțăriși 837671b
%setup -q -n %{pkgname}-%{version}
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
# remove shebang from files
Ionuț Arțăriși 3b7a9d3
%{__sed} -i.orig -e '/^#!\//, 1d' *py tornado/*.py tornado/*/*.py
Ionuț Arțăriși 837671b
Ionuț C. Arțăriși 06cf7a2
%if 0%{?with_python3}
Ionuț C. Arțăriși 06cf7a2
rm -rf %{py3dir}
Ionuț C. Arțăriși 06cf7a2
cp -a . %{py3dir}
Ionuț C. Arțăriși 06cf7a2
find %{py3dir} -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
Ionuț C. Arțăriși 06cf7a2
2to3 --write --nobackups %{py3dir}
Thomas Spura 5f3e8ac
pushd %{py3dir}
Thomas Spura 5f3e8ac
    # add __future__.division/print_function to testfile as 2to3 strips it off
Thomas Spura 5f3e8ac
    mv tornado/test/template_test.py tornado/test/template_test.py.orig
Thomas Spura 5f3e8ac
    echo "from __future__ import division" > tornado/test/template_test.py
Thomas Spura 5f3e8ac
    cat tornado/test/template_test.py.orig >> tornado/test/template_test.py
Thomas Spura 5f3e8ac
    touch -r tornado/test/template_test.py.orig tornado/test/template_test.py
Thomas Spura 5f3e8ac
    mv tornado/test/util_test.py tornado/test/util_test.py.orig
Thomas Spura 5f3e8ac
    echo "from __future__ import print_function" > tornado/test/util_test.py
Thomas Spura 5f3e8ac
    cat tornado/test/util_test.py.orig >> tornado/test/util_test.py
Thomas Spura 5f3e8ac
    touch -r tornado/test/util_test.py.orig tornado/test/util_test.py
Thomas Spura 5f3e8ac
popd
Ionuț C. Arțăriși 06cf7a2
%endif # with_python3
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
%build
Ionuț C. Arțăriși 06cf7a2
%if 0%{?with_python3}
Ionuț C. Arțăriși 06cf7a2
pushd %{py3dir}
Ionuț C. Arțăriși 06cf7a2
    python3 setup.py build
Ionuț C. Arțăriși 06cf7a2
popd
Ionuț C. Arțăriși 06cf7a2
%endif # with_python3
Ionuț C. Arțăriși 06cf7a2
Ionuț Arțăriși 837671b
python setup.py build
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
%install
Ionuț Arțăriși 837671b
rm -rf %{buildroot}
Ionuț Arțăriși 837671b
Ionuț C. Arțăriși 06cf7a2
%if 0%{?with_python3}
Ionuț C. Arțăriși 06cf7a2
pushd %{py3dir}
Thomas Spura b53d761
    PATH=$PATH:%{buildroot}%{python3_sitearch}/%{pkgname}
Ionuț C. Arțăriși 06cf7a2
    python3 setup.py install --root=%{buildroot}
Ionuț C. Arțăriși 06cf7a2
popd
Ionuț C. Arțăriși 06cf7a2
%endif # with_python3
Ionuț C. Arțăriși 06cf7a2
Thomas Spura b53d761
PATH=$PATH:%{buildroot}%{python_sitearch}/%{pkgname}
Ionuț Arțăriși 837671b
python setup.py install --root=%{buildroot}
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
%clean
Ionuț Arțăriși 837671b
rm -rf %{buildroot}
Ionuț Arțăriși 837671b
Ionuț Arțăriși 3b7a9d3
%check
Thomas Spura 23acb83
%if "%{dist}" != ".el6"
Ionuț C. Arțăriși 06cf7a2
    %if 0%{?with_python3}
Ionuț C. Arțăriși 06cf7a2
    pushd %{py3dir}
Thomas Spura b53d761
        PYTHONPATH=%{python3_sitearch} \
Thomas Spura 9f165ca
        python3 -m tornado.test.runtests --verbose || :
Ionuț C. Arțăriși 06cf7a2
    popd
Ionuț C. Arțăriși 06cf7a2
    %endif # with_python3
Thomas Spura b53d761
    PYTHONPATH=%{python_sitearch} \
Thomas Spura 9f165ca
    python -m tornado.test.runtests --verbose
Ionuț Arțăriși 68a49a7
%endif
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
%files
Thomas Spura 9f165ca
%doc README.rst PKG-INFO
Ionuț Arțăriși 837671b
Thomas Spura 9f165ca
%{python_sitearch}/%{pkgname}/
Thomas Spura 9f165ca
%{python_sitearch}/%{pkgname}-%{version}-*.egg-info
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
%files doc
Ionuț Arțăriși 837671b
%doc demos
Ionuț Arțăriși 837671b
Ionuț C. Arțăriși 06cf7a2
%if 0%{?with_python3}
Ionuț C. Arțăriși 06cf7a2
%files -n python3-tornado
Thomas Spura 9f165ca
%doc README.rst PKG-INFO
Ionuț C. Arțăriși 06cf7a2
Thomas Spura 9f165ca
%{python3_sitearch}/%{pkgname}/
Thomas Spura 9f165ca
%{python3_sitearch}/%{pkgname}-%{version}-*.egg-info
Ionuț C. Arțăriși 06cf7a2
Ionuț C. Arțăriși 06cf7a2
%files -n python3-tornado-doc
Ionuț C. Arțăriși 06cf7a2
%doc demos
Ionuț C. Arțăriși 06cf7a2
%endif
Ionuț C. Arțăriși 06cf7a2
Ionuț Arțăriși 3b7a9d3
Ionuț Arțăriși 837671b
%changelog
Thomas Spura c4b78df
* Tue May 19 2015 Thomas Spura <tomspur@fedoraproject.org> - 3.2.2-1
Thomas Spura c4b78df
- Update to 3.2.2 to fix breack attack cve (#1222816,#1222819)
Thomas Spura c4b78df
886a285
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-3
886a285
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
886a285
3a232cd
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.1-2
3a232cd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
3a232cd
Thomas Spura 9f165ca
* Thu May 22 2014 Thomas Spura <tomspur@fedoraproject.org> - 3.2.1-1
Thomas Spura 9f165ca
- update to 3.2.1
Thomas Spura 9f165ca
- no noarch anymore
Thomas Spura eb00596
- remove defattr
Thomas Spura 9f165ca
cd77d6b
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.2.1-7
cd77d6b
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
cd77d6b
b46fe17
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-6
b46fe17
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
b46fe17
Thomas Spura 29929f5
* Fri Jun 14 2013 Thomas Spura <tomspur@fedoraproject.org> - 2.2.1-5
Thomas Spura 29929f5
- remove rhel conditional for with_python3:
Thomas Spura 29929f5
  https://fedorahosted.org/fpc/ticket/200
Thomas Spura 29929f5
c5b2f6f
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-4
c5b2f6f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
c5b2f6f
5a9bc02
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 2.2.1-3
5a9bc02
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
5a9bc02
b86eea1
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.1-2
b86eea1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
b86eea1
Thomas Spura 23acb83
* Sun May 20 2012 Thomas Spura <tomspur@fedoraproject.org> - 2.2.1-1
Thomas Spura 23acb83
- update to upstream release 2.2.1 (fixes CVE-2012-2374)
Thomas Spura 23acb83
- fix typo for epel6 macro bug #822972 (Florian La Roche)
Thomas Spura 23acb83
Ionuț C. Arțăriși 59c6daa
* Thu Feb 9 2012 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 2.2-1
Ionuț C. Arțăriși 59c6daa
- upgrade to upstream release 2.2
Ionuț C. Arțăriși 59c6daa
Ionuț C. Arțăriși 7df18d8
* Thu Feb 9 2012 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 2.1.1-4
Ionuț C. Arțăriși 7df18d8
- remove python3-simplejson dependency
Ionuț C. Arțăriși 7df18d8
Ionuț C. Arțăriși 06cf7a2
* Fri Jan 27 2012 Thomas Spura <tomspur@fedoraproject.org> - 2.1.1-3
Ionuț C. Arțăriși 06cf7a2
- build python3 package
Ionuț C. Arțăriși 06cf7a2
10aeb90
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.1-2
10aeb90
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
10aeb90
Ionuț Arțăriși 48bc04e
* Tue Oct 25 2011 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 2.1.1-1
Ionuț Arțăriși 48bc04e
- new upstream version 2.1.1
Ionuț Arțăriși 48bc04e
- remove double word in description and rearrange it (#715272)
Ionuț Arțăriși 3b7a9d3
- fixed removal of shebangs
Thomas Spura 3699969
- added %%check section to run unittests during package build
Ionuț Arțăriși 48bc04e
Ionuț C. Arțăriși 8996172
* Tue Mar 29 2011 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.2.1-1
Ionuț C. Arțăriși 8996172
- new upstream version 1.2.1
Ionuț C. Arțăriși 8996172
8c9e386
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1-2
8c9e386
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
8c9e386
Ionuț C. Arțăriși c7e8089
* Wed Sep  8 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.1-1
Ionuț C. Arțăriși c7e8089
- new upstream release 1.1
Ionuț C. Arțăriși c7e8089
Ionuț C. Arțăriși dd5c86b
* Tue Aug 17 2010 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 1.0.1-1
Ionuț C. Arțăriși dd5c86b
- new upstream bugfix release: 1.0.1
Ionuț C. Arțăriși dd5c86b
Ionuț C. Arțăriși 8b49b47
* Wed Aug  4 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.0-2
Ionuț C. Arțăriși 8b49b47
- changed upstream source url
Ionuț C. Arțăriși 8b49b47
Ionuț C. Arțăriși b480663
* Wed Aug  4 2010 Ionuț C. Arțăriși <mapleoin@fedoraproject.org> - 1.0-1
Ionuț C. Arțăriși b480663
- new upstream release 1.0
Ionuț C. Arțăriși b480663
- there's no longer a problem with spurious permissions, so remove that fix
Ionuț C. Arțăriși b480663
0d26dac
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.2-4
0d26dac
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
0d26dac
Ionuț Arțăriși 837671b
* Wed Oct 21 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 0.2-3
Ionuț Arțăriși 837671b
- changed -doc package group to Documentation
Ionuț Arțăriși 837671b
- use global instead of define
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
* Tue Oct 20 2009 Ionuț Arțăriși <mapleoin@fedoraproject.org> - 0.2-2
Ionuț Arțăriși 837671b
- create -doc package for examples
Ionuț Arțăriși 837671b
- altered description to not include references to FriendFeed
Ionuț Arțăriși 837671b
- rename to python-tornado
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
* Fri Sep 25 2009 Ionuț Arțăriși <mapleoin@lavabit.com> - 0.2-1
Ionuț Arțăriși 837671b
- New upstream version
Ionuț Arțăriși 837671b
- Fixed macro usage and directory ownership in spec
Ionuț Arțăriși 837671b
Ionuț Arțăriși 837671b
* Thu Sep 10 2009 Ionuț Arțăriși <mapleoin@lavabit.com> - 0.1-1
Ionuț Arțăriși 837671b
- Initial release
Ionuț Arțăriși 837671b