diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f415a4e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/aiodns-1.1.1.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 009a6ef..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# python-aiodns - -The python-aiodns package \ No newline at end of file diff --git a/python-aiodns.spec b/python-aiodns.spec new file mode 100644 index 0000000..1b7dcdd --- /dev/null +++ b/python-aiodns.spec @@ -0,0 +1,116 @@ +# set upstream name variable +%global srcname aiodns + + +%if 0%{?fedora} +%bcond_without python3 +%else +%bcond_with python3 +%endif + +Name: python-aiodns +Version: 1.1.1 +Release: 1%{?dist} +Summary: Simple DNS resolver for asyncio + +License: MIT +URL: https://github.com/saghul/aiodns +Source0: https://github.com/saghul/%{srcname}/archive/%{srcname}-%{version}.tar.gz + +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: python2-pycares +%if %{with python3} +BuildRequires: python3-devel +BuildRequires: python3-pycares +%endif # with python3 +Requires: python2-pycares +Requires: python-trollius + +%description +aiodns provides a simple way for doing asynchronous DNS resolutions +with a synchronous looking interface by using pycares. + + +%package -n python2-%{srcname} +Summary: Simple DNS resolver for asyncio +BuildArch: noarch +Requires: python2-pycares +Requires: python-trollius +%{?python_provide:%python_provide python2-%{srcname}} + +%description -n python2-%{srcname} +aiodns provides a simple way for doing asynchronous DNS resolutions +with a synchronous looking interface by using pycares. + + +%if %{with python3} +%package -n python3-%{srcname} +Summary: Simple DNS resolver for asyncio +BuildArch: noarch +Requires: python3-pycares +%{?python_provide:%python_provide python3-%{srcname}} + +%description -n python3-%{srcname} +aiodns provides a simple way for doing asynchronous DNS resolutions +with a synchronous looking interface by using pycares. +%endif # with python3 + + + +%prep +%autosetup -n %{srcname}-%{srcname}-%{version} + + +%build +%py2_build + +%if %{with python3} +%py3_build +%endif # with python3 + + +%install +# Must do the python3 install first because the scripts in /usr/bin are +# overwritten with every setup.py install (and we want the python2 version +# to be the default for now). +%if %{with python3} +%py3_install +%endif # with python3 + +%py2_install + + +%check +# Unit tests perform DNS resolution and requires active Internet +# connection: disabling +##%{__python2} setup.py test + +%if %{with python3} +##%{__python3} setup.py test +%endif + + + +%files -n python2-%{srcname} +%license LICENSE +%doc README.rst ChangeLog +# For noarch packages: sitelib +%{python2_sitelib}/%{srcname}-%{version}-*.egg-info/ +%{python2_sitelib}/%{srcname}/ + + +%if %{with python3} +%files -n python3-%{srcname} +%license LICENSE +%doc README.rst ChangeLog +# For noarch packages: sitelib +%{python3_sitelib}/%{srcname}-%{version}-*.egg-info/ +%{python3_sitelib}/%{srcname}/ +%endif # with python3 + + + +%changelog +* Wed Apr 4 2018 Matthieu Saulnier - 1.1.1-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..8dc5e0f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (aiodns-1.1.1.tar.gz) = 1da5f50b05b1e9a7e69c13f03596b4f74f5cb7500626abace91aba84770f70bbc62336bec33cdbc2bd34b0a97a5973749d08bdc60862876819d42f6356210af6