python-tornado/python-tornado.spec

246 lines
8.1 KiB
RPMSpec
Raw Normal View History

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