%if 0%{?fedora} # not yet supported by upstream %global with_python3 0 %endif %global srcname getdns-python-bindings Name: python-getdns Version: 0.3.1 Release: 2%{?dist} Summary: Python bindings for getdns License: getdns python binding URL: https://getdnsapi.net/ Source0: https://github.com/getdnsapi/getdns-python-bindings-%{version}.tar.gz BuildRequires: python2-devel BuildRequires: python2-devel BuildRequires: python-setuptools %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %endif # with_python3 BuildRequires: getdns >= 0.1.7 BuildRequires: ldns >= 1.6.11 BuildRequires: unbound-libs >= 1.4.16 BuildRequires: expat, libidn BuildRequires: libevent >= 2.0.21 %description python bindins for getdns. %if 0%{?with_python3} %package -n python3-%{srcname} Summary: python3 bindings for getdns %description -n python3-%{srcname} python3 bindings for getdns %endif # with_python3 %prep %setup -q -n %{srcname}-%{version} %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif # with_python3 %build %{__python2} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif # with_python3 %install %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} popd %endif # with_python3 %{__python2} setup.py install --skip-build --root %{buildroot} %files %doc README.md LICENSE examples %{python2_sitearch}/getdns.so %{python2_sitearch}/getdns-%{version}-py%{python2_version}.egg-info %if 0%{?with_python3} %files -n python3-%{srcname} %doc README.md LICENSE %{python3_sitelib}/%{srcname} %endif # with_python3 %changelog * Sun Aug 23 2015 Paul Wouters - 0.3.1-1 - Initial package