diff --git a/cheroot-9.0.0.tar.gz b/cheroot-9.0.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..3a18b643362432b02f82d4ea5493774a5d3a8929 Binary files /dev/null and b/cheroot-9.0.0.tar.gz differ diff --git a/python-cheroot.spec b/python-cheroot.spec new file mode 100644 index 0000000000000000000000000000000000000000..808437dfb4dbb977ebe2db18ac9c3030a0507c83 --- /dev/null +++ b/python-cheroot.spec @@ -0,0 +1,91 @@ +%define anolis_release 1 + +%global pypi_name cheroot +%bcond_with docs + +Summary: Highly-optimized, pure-python HTTP server +Name: python-%{pypi_name} +Version: 9.0.0 +Release: %{anolis_release}%{?dist} +License: BSD +URL: https://github.com/cherrypy/cheroot +Source0: %{pypi_source} +BuildArch: noarch + +%description +Cheroot is the high-performance, pure-Python HTTP server used by CherryPy. + +%package -n python3-%{pypi_name} +Summary: Highly-optimized, pure-python HTTP server +BuildRequires: python3-devel, python3-pyOpenSSL +BuildRequires: python3dist(jaraco-functools), python3dist(jaraco-text) +BuildRequires: python3dist(portend), python3dist(pytest) +BuildRequires: python3dist(pytest-mock), python3dist(pytest-forked) +BuildRequires: python3dist(pytest-rerunfailures), python3dist(requests-toolbelt) +BuildRequires: python3dist(requests), python3dist(requests-unixsocket) +BuildRequires: python3dist(setuptools), python3dist(setuptools-scm), python3dist(trustme) + +Requires: python3dist(six) >= 1.11, python3dist(more-itertools) >= 2.6 +Requires: python3-pyOpenSSL, python3dist(jaraco-functools) +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +Cheroot is the high-performance, pure-Python HTTP server used by CherryPy. + +%if %{with docs} +%package -n python3-%{pypi_name}-doc +Summary: cheroot documentation + +BuildRequires: python3dist(sphinx), python3-sphinx-theme-alabaster +BuildRequires: python3dist(rst-linker), python3dist(jaraco-packaging), python3dist(docutils) + +%description -n python3-%{pypi_name}-doc +Documentation for cheroot +%endif + +%prep +%autosetup -n %{pypi_name}-%{version} +# Remove pytest processes directive +sed -i 's/ --numprocesses=auto//' pytest.ini +# Remove optional pytest-cov dependency +sed -i -e /--cov=/d -e '/--cov-report /d' pytest.ini +# drop setuptools_scm_git_archive +sed -i '/setuptools_scm_git_archive/d' setup.cfg +# jaraco.context +sed -i '/jaraco.context/d' cheroot/test/test_wsgi.py +sed -i '39 i @pytest.mark.skip()' cheroot/test/test_wsgi.py +# skip builtin ssl adapter type due to incompatble with pytest 7 +sed -i '199 i @pytest.skip("Incompatible with pytest 7 because of rerunfailures", allow_module_level=True)' cheroot/test/test_ssl.py +# Remove pypytools +sed -i '/pypytools/d' cheroot/test/test_server.py +sed -i "/getfixturevalue('_garbage_bin')/d" cheroot/test/test_server.py + +%build +%py3_build +%if %{with docs} +sphinx-build -vvv docs html +rm -rf html/.{doctrees,buildinfo} +%endif + +%install +%py3_install + +%check +LANG=C.utf-8 %{__python3} -m pytest --ignore=build -W ignore::DeprecationWarning -p no:unraisableexception + +%files -n python3-%{pypi_name} +%license LICENSE.md +%doc README.rst +%{_bindir}/cheroot +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}*egg-info + +%if %{with docs} +%files -n python3-%{pypi_name}-doc +%license LICENSE.md +%doc html +%endif + +%changelog +* Wed Apr 19 2023 DengXiewei - 9.0.0-1 +- Initial package from upstream