%global srcname tornado %global common_description %{expand: 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.} %global python3_pkgversion 3.11 Name: python-%{srcname} Version: 6.3.3 Release: 4.ac%{?dist} Summary: Scalable, non-blocking web server and tools License: Apache-2.0 URL: https://www.tornadoweb.org Source0: https://github.com/tornadoweb/tornado/archive/v%{version}/%{srcname}-%{version}.tar.gz # Do not turn DeprecationWarning in tornado module into Exception # fixes FTBFS with Python 3.8 Patch1: Do-not-turn-DeprecationWarning-into-Exception.patch # Fixes for Python 3.12 - rebased # https://github.com/tornadoweb/tornado/pull/3288 Patch2: python-tornado-Python-3.12.patch BuildRequires: gcc BuildRequires: python%{python3_pkgversion}-devel %description %{common_description} %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} %description -n python%{python3_pkgversion}-%{srcname} %{common_description} %package doc Summary: Examples for %{name} %description doc %{common_description} This package contains some example applications. %prep %autosetup -p1 -n %{srcname}-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files %{srcname} %check # Skip the same timing-related tests that upstream skips when run in Travis CI. # https://github.com/tornadoweb/tornado/commit/abc5780a06a1edd0177a399a4dd4f39497cb0c57 export TRAVIS=true # Increase timeout for tests on riscv64 %ifarch riscv64 export ASYNC_TEST_TIMEOUT=80 %endif %{python3} -m tornado.test for b in $(find %{buildroot}%{_bindir}/ -type f) ; do mv "$b" $(sed -re "s/(.*)?$/\1%{python3_pkgversion}/"<<<"$m"); done for m in $(find %{buildroot}%{_mandir}/ -type f) ; do mv "$m" $(sed -re "s/(.*).([1-8]([^.]+)?)$/\1%{python3_pkgversion}.\2/"<<<"$m"); done for m in $(find %{buildroot}%{_datadir}/locale/* -type f) ; do mv "$m" $(sed -re "s/(.*).mo$/\1%{python3_pkgversion}.mo/"<<<"$m"); done %files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %doc README.rst %files doc %license LICENSE %doc demos %changelog * Thu Mar 21 2024 Ding-Yi Chen - 6.3.3-4.ac - Bruteforce packaging