From 30bd7f973c5f100717c4628ccafc99ce2c8d5944 Mon Sep 17 00:00:00 2001 From: Carl George Date: Mar 04 2022 07:32:39 +0000 Subject: Latest upstream 3.5.0 - Enable test suite - Only run test on Fedora - Only build docs on Fedora Resolves: rhbz#2007952 --- diff --git a/python-anyio.spec b/python-anyio.spec index 010a0e2..78fe0e3 100644 --- a/python-anyio.spec +++ b/python-anyio.spec @@ -1,69 +1,79 @@ -# what it's called on pypi %global srcname anyio -# what it's imported as -%global libname %{srcname} -# name of egg info directory -%global eggname %{srcname} -# package name fragment -%global pkgname %{srcname} -# tests need coverage[toml] which isn't provided yet -%bcond_with tests +%if %{defined fedora} +# As of 2022-03-04, neither EL9 or EPEL9 have python3-uvloop +%bcond_without tests +# As of 2022-03-04, neither EL9 or EPEL9 have python3-sphinx-autodoc-typehints +%bcond_without docs +%endif %global common_description %{expand: -AnyIO is a asynchronous compatibility API that allows applications and -libraries written against it to run unmodified on asyncio, curio and trio.} +AnyIO is an asynchronous networking and concurrency library that works on top +of either asyncio or trio. It implements trio-like structured concurrency (SC) +on top of asyncio, and works in harmony with the native SC of trio itself.} -Name: python-%{pkgname} -Version: 3.3.1 -Release: 3%{?dist} +Name: python-%{srcname} +Version: 3.5.0 +Release: 1%{?dist} Summary: Compatibility layer for multiple asynchronous event loop implementations License: MIT -URL: https://github.com/agronholm/%{srcname} -Source0: %pypi_source - +URL: https://github.com/agronholm/anyio +Source: %pypi_source BuildArch: noarch %description %{common_description} -%package -n python3-%{pkgname} +%package -n python3-%{srcname} Summary: %{summary} -BuildRequires: pyproject-rpm-macros -BuildRequires: python3dist(sphinx) -BuildRequires: python3dist(curio) +BuildRequires: python3-devel -%generate_buildrequires -%pyproject_buildrequires -x doc,trio%{?with_tests:,test} -%description -n python3-%{pkgname} %{common_description} +%description -n python3-%{srcname} %{common_description} -%pyproject_extras_subpkg -n python3-%{pkgname} trio +%pyproject_extras_subpkg -n python3-%{srcname} trio +%if %{with docs} %package -n python-%{srcname}-doc Summary: anyio documentation + + %description -n python-%{srcname}-doc Documentation for anyio +%endif %prep %autosetup -n %{srcname}-%{version} -p1 -rm -rf %{eggname}.egg-info + +# disable coverage test requirement +sed -e '/coverage/d' -i setup.cfg + +# despite the prescense of a pytest "network" marker, socket tests still fail +# without internet access +rm tests/test_sockets.py + + +%generate_buildrequires +%pyproject_buildrequires -x trio%{?with_tests:,test}%{?with_docs:,doc} + %build %pyproject_wheel +%if %{with docs} # generate html docs PYTHONPATH=${PWD} sphinx-build-3 docs html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} +%endif %install %pyproject_install -%pyproject_save_files anyio +%pyproject_save_files %{srcname} %if %{with tests} @@ -72,17 +82,24 @@ rm -rf html/.{doctrees,buildinfo} %endif -%files -n python3-%{pkgname} -f %{pyproject_files} -%license LICENSE +%files -n python3-%{srcname} -f %{pyproject_files} %doc README.rst +%if %{with docs} %files -n python-%{srcname}-doc %doc html %license LICENSE +%endif %changelog +* Fri Mar 04 2022 Carl George - 3.5.0-1 +- Latest upstream rhbz#2007952 +- Enable test suite +- Only run test on Fedora +- Only build docs on Fedora + * Fri Jan 21 2022 Fedora Release Engineering - 3.3.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index f4ee942..4905ca3 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (anyio-3.3.1.tar.gz) = 36c1d47843c0817a94dd8ff3269654918942731581bde57a19b1114aa72b5f091feffd634b44afb2b55c7977aec1cae83a726a5c10221d345233236b37dd5d3d +SHA512 (anyio-3.5.0.tar.gz) = b91124c95d194eb7e4542405a973895d21562a2636d9600d528465da52536d1ffedbf5a6fc3ea5b1ff3e83e7dca2b42f090bb2ff6b077e32f5a2c314f07d3206