f96dca4
Name:           python-sniffio
f96dca4
Version:        1.3.0
f96dca4
Release:        %autorelease
f96dca4
Summary:        Sniff out which async library your code is running under
f96dca4
License:        MIT OR Apache-2.0
f96dca4
URL:            https://github.com/python-trio/sniffio
f96dca4
Source:         %{pypi_source sniffio}
f96dca4
BuildArch:      noarch
f96dca4
460e3a3
%global common_description %{expand:
460e3a3
You're writing a library.  You've decided to be ambitious, and support multiple
460e3a3
async I/O packages, like Trio, and asyncio, and ... You've written a bunch of
460e3a3
clever code to handle all the differences.  But... how do you know which piece
460e3a3
of clever code to run?  This is a tiny package whose only purpose is to let you
460e3a3
detect which async library your code is running under.}
d188796
d188796
460e3a3
%description %{common_description}
d188796
d188796
f96dca4
%package -n python3-sniffio
d188796
Summary:        %{summary}
460e3a3
BuildRequires:  python3-devel
56af20e
BuildRequires:  %{py3_dist pytest}
d498088
d188796
f96dca4
%description -n python3-sniffio %{common_description}
d188796
d188796
d188796
%prep
f96dca4
%autosetup -n sniffio-%{version}
8864c8a
8864c8a
8864c8a
%generate_buildrequires
f96dca4
%pyproject_buildrequires
d188796
d188796
d188796
%build
8864c8a
%pyproject_wheel
d188796
d188796
d188796
%install
8864c8a
%pyproject_install
f96dca4
%pyproject_save_files sniffio
d188796
d188796
d188796
%check
56af20e
# curio is upstream discontinued and is not yet available for Python 3.12
56af20e
%pytest --verbose -k "not test_curio"
d188796
d188796
f96dca4
%files -n python3-sniffio -f %{pyproject_files}
d188796
%doc README.rst
d188796
d188796
d188796
%changelog
2913349
%autochangelog