%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: tornado Version: 0.2 Release: 1%{?dist} Summary: Scalable, non-blocking web server and tools Group: Development/Libraries License: ASL 2.0 URL: http://www.tornadoweb.org Source0: http://www.tornadoweb.org/static/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python-devel Requires: python-pycurl Requires: python-simplejson %description Tornado is an open source version of the scalable, non-blocking web server and and tools that power FriendFeed. The FriendFeed application is written using a web framework that looks a bit like web.py or Google's webapp, but with additional tools and optimizations to take advantage of the underlying non-blocking infrastructure. 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. We built the web server specifically to handle FriendFeed's real-time features — every active user of FriendFeed maintains an open connection to the FriendFeed servers %prep %setup -q # remove shebang from files for File in `find %{name} -name "*py"`; do %{__sed} -i.orig -e 1d ${File} touch -r ${File}.orig ${File} %{__rm} ${File}.orig done # spurious permission fix %{__chmod} -x demos/*/*py %{__chmod} -x demos/*/*/*py %{__chmod} -x demos/*/*/*/*py # remove empty file rm -rf demos/facebook/static/facebook.js %build python setup.py build %install rm -rf %{buildroot} PATH=$PATH:%{buildroot}%{python_sitelib}/%{name} python setup.py install --root=%{buildroot} %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc demos README PKG-INFO %{python_sitelib}/%{name}/ %{python_sitelib}/%{name}-%{version}-*.egg-info %changelog * Fri Sep 25 2009 Ionuț Arțăriși - 0.2-1 - New upstream version - Fixed macro usage and directory ownership in spec * Thu Sep 10 2009 Ionuț Arțăriși - 0.1-1 - Initial release