a2123d2
# what it's called on pypi
a2123d2
%global srcname anyio
a2123d2
# what it's imported as
a2123d2
%global libname %{srcname}
a2123d2
# name of egg info directory
a2123d2
%global eggname %{srcname}
a2123d2
# package name fragment
a2123d2
%global pkgname %{srcname}
a2123d2
a2123d2
%global common_description %{expand:
a2123d2
AnyIO is a asynchronous compatibility API that allows applications and
a2123d2
libraries written against it to run unmodified on asyncio, curio and trio.}
a2123d2
a2123d2
%bcond_without  tests
a2123d2
a2123d2
a2123d2
Name:           python-%{pkgname}
a2123d2
Version:        1.0.0
55bfa6b
Release:        2%{?dist}
a2123d2
Summary:        Compatibility layer for multiple asynchronous event loop implementations
a2123d2
License:        MIT
a2123d2
URL:            https://github.com/agronholm/anyio
a2123d2
Source0:        %pypi_source
a2123d2
BuildArch:      noarch
a2123d2
a2123d2
a2123d2
%description %{common_description}
a2123d2
a2123d2
a2123d2
%package -n python3-%{pkgname}
a2123d2
Summary:        %{summary}
a2123d2
BuildRequires:  python3-devel
a2123d2
BuildRequires:  python3-setuptools
a2123d2
BuildRequires:  python3-setuptools_scm
a2123d2
%if %{with tests}
a2123d2
BuildRequires:  python3-coverage >= 4.5
a2123d2
BuildRequires:  python3-hypothesis >= 4.0
a2123d2
BuildRequires:  python3-pytest >= 3.7.2
a2123d2
BuildRequires:  python3-uvloop
a2123d2
BuildRequires:  python3-trio >= 0.11
a2123d2
BuildRequires:  python3-curio >= 0.9
a2123d2
BuildRequires:  python3-async-generator
a2123d2
BuildRequires:  python3-sniffio >= 1.1
a2123d2
%endif
a2123d2
Requires:       python3-async-generator
a2123d2
Requires:       python3-sniffio >= 1.1
a2123d2
%{?python_provide:%python_provide python3-%{pkgname}}
a2123d2
a2123d2
a2123d2
%description -n python3-%{pkgname} %{common_description}
a2123d2
a2123d2
a2123d2
%prep
a2123d2
%autosetup -n %{srcname}-%{version}
a2123d2
rm -rf %{eggname}.egg-info
a2123d2
a2123d2
a2123d2
%build
a2123d2
%py3_build
a2123d2
a2123d2
a2123d2
%install
a2123d2
%py3_install
a2123d2
a2123d2
a2123d2
%if %{with tests}
a2123d2
%check
a2123d2
export PYTHONPATH=%{buildroot}%{python3_sitelib}
a2123d2
export PYTHONDONTWRITEBYTECODE=1
a2123d2
py.test-%{python3_version} --verbose tests
a2123d2
%endif
a2123d2
a2123d2
a2123d2
%files -n python3-%{pkgname}
a2123d2
%license LICENSE
a2123d2
%doc README.rst
a2123d2
%{python3_sitelib}/%{libname}
a2123d2
%{python3_sitelib}/%{eggname}-%{version}-py%{python3_version}.egg-info
a2123d2
a2123d2
a2123d2
%changelog
55bfa6b
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
55bfa6b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
55bfa6b
a2123d2
* Thu May 16 2019 Carl George <carl@george.computer> - 1.0.0-1
a2123d2
- Initial package