%if 0%{?fedora} # Disabled for now # Need to figure out why it can't find python3-dns # pkg_resources.DistributionNotFound: dnspython==1.11.1 %global with_python3 0 %endif Name: dnsyo Version: 1.0.2 Release: 4%{?dist} Summary: Check DNS against many global DNS servers Group: Applications/Internet License: MIT URL: http://samarudge.github.io/dnsyo/ Source0: https://pypi.python.org/packages/source/d/%{name}/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools # For manpage BuildRequires: python-dns BuildRequires: python-requests BuildRequires: PyYAML BuildRequires: help2man Requires: python-dns Requires: python-requests Requires: PyYAML %if 0%{?with_python3} BuildRequires: python3-devel Buildrequires: python3-setuptools # For manpage. BuildRequires: python3-requests BuildRequires: python3-dns BuildRequires: python3-PyYAML Requires: python3-requests Requires: python3-dns Requires: python3-PyYAML %endif %description Query over 1500 global DNS servers and colate their results. Track the propagation of your domains around the world. %if 0%{?with_python3} %package -n python3-dnsyo Summary: Check DNS against many global DNS servers Group: Applications/Internet %description -n python3-dnsyo Query over 1500 global DNS servers and colate their results. Track the propagation of your domains around the world. %endif %prep %setup -q sed -i 's/requests==2.0.0/requests>=1.1.0/' setup.py %build %{__python} setup.py build %if 0%{?with_python3} cp -r . %{py3dir} pushd %{py3dir} %{__python3} setup.py build popd %endif %install # For manpage. export PYTHONPATH=%{buildroot}%{python_sitelib}:%{buildroot}%{python3_sitelib} mkdir -p %{buildroot}/%{_mandir}/man1 %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install --skip-build --root %{buildroot} mv %{buildroot}/%{_bindir}/%{name} %{buildroot}/%{_bindir}/python3-%{name} popd help2man -N --version-string=%{version} %{buildroot}/%{_bindir}/python3-%{name} > %{buildroot}/%{_mandir}/man1/python3-%{name}.1 %endif %{__python} setup.py install --skip-build --root %{buildroot} help2man -N --version-string=%{version} %{buildroot}/%{_bindir}/%{name} > %{buildroot}/%{_mandir}/man1/%{name}.1 %files %{_mandir}/man1/%{name}.1* %{python_sitelib}/%{name}/ %{python_sitelib}/dnsyo-1.0.2* %{_bindir}/%{name} %if 0%{?with_python3} %{_mandir}/man1/python3-%{name}.1* %{python3_sitelib}/%{name}/ %{python3_sitelib}/dnsyo-1.0.2* %{_bindir}/python3-%{name} %endif %changelog * Sat Oct 19 2013 Ricky Elrod - 1.0.2-4 - Make it noarch. * Sat Oct 19 2013 Ricky Elrod - 1.0.2-3 - Add missing BuildRequires for setuptools. - Add missing BuildRequires for help2man to run successfully. * Sat Oct 19 2013 Ricky Elrod - 1.0.2-2 - Add manpage with help2man, if we're on Fedora (no --version-string on RHEL version). - Fix files section for python3. - Move python3 binary to python3-dnsyo. - Disable python3 build on Fedora for now, it can't find python3-dns. * Sat Oct 19 2013 Ricky Elrod - 1.0.2-1 - Initial build.