Blob Blame History Raw
# 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}

%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.}

%bcond_without  tests

Name:           python-%{pkgname}
Version:        1.0.0
Release:        2%{?dist}
Summary:        Compatibility layer for multiple asynchronous event loop implementations
License:        MIT
Source0:        %pypi_source
BuildArch:      noarch

%description %{common_description}

%package -n python3-%{pkgname}
Summary:        %{summary}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-setuptools_scm
%if %{with tests}
BuildRequires:  python3-coverage >= 4.5
BuildRequires:  python3-hypothesis >= 4.0
BuildRequires:  python3-pytest >= 3.7.2
BuildRequires:  python3-uvloop
BuildRequires:  python3-trio >= 0.11
BuildRequires:  python3-curio >= 0.9
BuildRequires:  python3-async-generator
BuildRequires:  python3-sniffio >= 1.1
Requires:       python3-async-generator
Requires:       python3-sniffio >= 1.1
%{?python_provide:%python_provide python3-%{pkgname}}

%description -n python3-%{pkgname} %{common_description}

%autosetup -n %{srcname}-%{version}
rm -rf %{eggname}.egg-info



%if %{with tests}
export PYTHONPATH=%{buildroot}%{python3_sitelib}
py.test-%{python3_version} --verbose tests

%files -n python3-%{pkgname}
%license LICENSE
%doc README.rst

* Fri Jul 26 2019 Fedora Release Engineering <> - 1.0.0-2
- Rebuilt for

* Thu May 16 2019 Carl George <> - 1.0.0-1
- Initial package