7873274
# set upstream name variable
7873274
%global srcname aiodns
7873274
7873274
7873274
%if 0%{?fedora}
7873274
%bcond_without python3
7873274
%else
7873274
%bcond_with python3
7873274
%endif
7873274
7873274
Name:           python-aiodns
7873274
Version:        1.1.1
7873274
Release:        1%{?dist}
7873274
Summary:        Simple DNS resolver for asyncio
7873274
7873274
License:        MIT
7873274
URL:            https://github.com/saghul/aiodns
7873274
Source0:        https://github.com/saghul/%{srcname}/archive/%{srcname}-%{version}.tar.gz
7873274
7873274
BuildArch:      noarch
7873274
BuildRequires:  python2-devel
7873274
BuildRequires:  python2-pycares
7873274
%if %{with python3}
7873274
BuildRequires:  python3-devel
7873274
BuildRequires:  python3-pycares
7873274
%endif # with python3
7873274
Requires:       python2-pycares
7873274
Requires:       python-trollius
7873274
7873274
%description
7873274
aiodns provides a simple way for doing asynchronous DNS resolutions
7873274
with a synchronous looking interface by using pycares.
7873274
7873274
7873274
%package      -n python2-%{srcname}
7873274
Summary:        Simple DNS resolver for asyncio
7873274
BuildArch:      noarch
7873274
Requires:       python2-pycares
7873274
Requires:       python-trollius
7873274
%{?python_provide:%python_provide python2-%{srcname}}
7873274
7873274
%description -n python2-%{srcname}
7873274
aiodns provides a simple way for doing asynchronous DNS resolutions
7873274
with a synchronous looking interface by using pycares.
7873274
7873274
7873274
%if %{with python3}
7873274
%package     -n python3-%{srcname}
7873274
Summary:        Simple DNS resolver for asyncio
7873274
BuildArch:      noarch
7873274
Requires:       python3-pycares
7873274
%{?python_provide:%python_provide python3-%{srcname}}
7873274
7873274
%description -n python3-%{srcname}
7873274
aiodns provides a simple way for doing asynchronous DNS resolutions
7873274
with a synchronous looking interface by using pycares.
7873274
%endif # with python3
7873274
7873274
7873274
7873274
%prep
7873274
%autosetup -n %{srcname}-%{srcname}-%{version}
7873274
7873274
7873274
%build
7873274
%py2_build
7873274
7873274
%if %{with python3}
7873274
%py3_build
7873274
%endif # with python3
7873274
7873274
7873274
%install
7873274
# Must do the python3 install first because the scripts in /usr/bin are
7873274
# overwritten with every setup.py install (and we want the python2 version
7873274
# to be the default for now).
7873274
%if %{with python3}
7873274
%py3_install
7873274
%endif # with python3
7873274
7873274
%py2_install
7873274
7873274
7873274
%check
7873274
# Unit tests perform DNS resolution and requires active Internet
7873274
# connection: disabling
7873274
##%{__python2} setup.py test
7873274
7873274
%if %{with python3}
7873274
##%{__python3} setup.py test
7873274
%endif
7873274
7873274
7873274
7873274
%files -n python2-%{srcname}
7873274
%license LICENSE
7873274
%doc README.rst ChangeLog
7873274
# For noarch packages: sitelib
7873274
%{python2_sitelib}/%{srcname}-%{version}-*.egg-info/
7873274
%{python2_sitelib}/%{srcname}/
7873274
7873274
7873274
%if %{with python3}
7873274
%files -n python3-%{srcname}
7873274
%license LICENSE
7873274
%doc README.rst ChangeLog
7873274
# For noarch packages: sitelib
7873274
%{python3_sitelib}/%{srcname}-%{version}-*.egg-info/
7873274
%{python3_sitelib}/%{srcname}/
7873274
%endif # with python3
7873274
7873274
7873274
7873274
%changelog
7873274
* Wed Apr  4 2018 Matthieu Saulnier <fantom@fedoraproject.org> - 1.1.1-1
7873274
- Initial package