d188796
# what it's called on pypi
d188796
%global srcname sniffio
d188796
# what it's imported as
d188796
%global libname sniffio
d188796
# name of egg info directory
d188796
%global eggname sniffio
d188796
# package name fragment
d188796
%global pkgname sniffio
d188796
d188796
%global _description \
d188796
You're writing a library.  You've decided to be ambitious, and support multiple\
d188796
async I/O packages, like Trio, and asyncio, and ... You've written a bunch of\
d188796
clever code to handle all the differences.  But... how do you know which piece\
d188796
of clever code to run?  This is a tiny package whose only purpose is to let you\
d188796
detect which async library your code is running under.
d188796
d188796
d188796
Name:           python-%{pkgname}
d188796
Version:        1.0.0
d188796
Release:        1%{?dist}
d188796
Summary:        Sniff out which async library your code is running under
d188796
License:        MIT or ASL 2.0
d188796
URL:            https://github.com/python-trio/sniffio
d188796
Source0:        %pypi_source
d188796
BuildArch:      noarch
d188796
d188796
d188796
%description %{_description}
d188796
d188796
d188796
%package -n python%{python3_pkgversion}-%{pkgname}
d188796
Summary:        %{summary}
d188796
BuildRequires:  python%{python3_pkgversion}-devel
d188796
BuildRequires:  python%{python3_pkgversion}-setuptools
d188796
BuildRequires:  python%{python3_pkgversion}-pytest
d188796
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pkgname}}
d188796
d188796
d188796
%description -n python%{python3_pkgversion}-%{pkgname} %{_description}
d188796
d188796
d188796
%prep
d188796
%autosetup -n %{srcname}-%{version}
d188796
rm -rf %{eggname}.egg-info
d188796
d188796
d188796
%build
d188796
%py3_build
d188796
d188796
d188796
%install
d188796
%py3_install
d188796
d188796
d188796
%check
d188796
py.test-%{python3_version} --verbose
d188796
d188796
d188796
%files -n python%{python3_pkgversion}-%{pkgname}
d188796
%license LICENSE LICENSE.MIT LICENSE.APACHE2
d188796
%doc README.rst
d188796
%{python3_sitelib}/%{libname}
d188796
%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info
d188796
d188796
d188796
%changelog
d188796
* Wed Sep 12 2018 Carl George <carl@george.computer> - 1.0.0-1
d188796
- Initial package