%global srcname tornado %global __python3 /usr/bin/python3.11 %global python3_pkgversion 3.11 Name: python-%{srcname} Version: 6.0.2 Release: 1%{?dist} Summary: Scalable, non-blocking web server and tools License: ASL 2.0 URL: http://www.tornadoweb.org Source0: %{pypi_source} # Do not turn DeprecationWarning in tornado module into Exception # fixes FTBFS with Python 3.8 Patch1: Do-not-turn-DeprecationWarning-into-Exception.patch Patch2: https://github.com/tornadoweb/tornado/pull/2681.patch BuildRequires: gcc BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-devel %description 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 python%{python3_pkgversion}-%{srcname} Summary: Scalable, non-blocking web server and tools %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} Requires: python%{python3_pkgversion}-pycurl %description -n python%{python3_pkgversion}-%{srcname} 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 doc Summary: Examples for python-tornado Obsoletes: python%{python3_pkgversion}-%{srcname}-doc < 4.2.1-3 Provides: python%{python3_pkgversion}-%{srcname}-doc = %{version}-%{release} %description doc Tornado is an open source version of the scalable, non-blocking web server and and tools. This package contains some example applications. %prep %autosetup -p1 -n %{srcname}-%{version} # remove shebang from files %{__sed} -i.orig -e '/^#!\//, 1d' *py tornado/*.py tornado/*/*.py %build %py3_build %install %py3_install # %%check # export ASYNC_TEST_TIMEOUT=10 # %%{__python3} -m tornado.test.runtests --verbose %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %doc README.rst %{python3_sitearch}/%{srcname}/ %{python3_sitearch}/%{srcname}-%{version}-*.egg-info %files doc %doc demos %changelog