%if 0%{?fedora}
%bcond_without python3
%endif
Name: dnsyo
Version: 2.0.7
Release: 7%{?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
%if %{with python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
# For manpage.
BuildRequires: help2man
BuildRequires: python3-requests
BuildRequires: python3-dns
BuildRequires: python3-PyYAML
Requires: python3-requests
Requires: python3-dns
Requires: python3-PyYAML
%else
BuildRequires: python2-devel
BuildRequires: python2-setuptools
Requires: python2-dns
Requires: python2-requests
Requires: PyYAML
%endif
%description
Query over 1500 global DNS servers and colate their results.
Track the propagation of your domains around the world.
%prep
%setup -q
# replace all == (pinned) requirements with >= (not pinned)
# using sed form: /RE/s/LHS/RHS/g
# which does a regular s/LHS/RHS/g only on lines where RE is found
sed -i -e '/_requires/s/==/>=/g' setup.py
# dnspython supports both 2 and 3 since 1.13.0, nothing provides the
# 'dnspython3' distribution on Fedora any more
sed -i -e 's/dnspython3/dnspython/g' setup.py
%build
%if %{with python3}
%py3_build
%else
%py2_build
%endif
%install
# For manpage.
export PYTHONPATH=%{buildroot}%{python2_sitelib}:%{buildroot}%{python3_sitelib}
mkdir -p %{buildroot}/%{_mandir}/man1
%if %{with python3}
%py3_install
help2man -N --version-string=%{version} %{buildroot}/%{_bindir}/%{name} > %{buildroot}/%{_mandir}/man1/%{name}.1
%else
%py2_install
%endif
%files
%{_bindir}/%{name}
%if %{with python3}
%{_mandir}/man1/%{name}.1*
%{python3_sitelib}/%{name}/
%{python3_sitelib}/%{name}-%{version}*
%else
%{python2_sitelib}/%{name}/
%{python2_sitelib}/%{name}-%{version}*
%endif
%changelog
* Fri Apr 13 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.7-7
- Switch to Python 3 in Fedora (rhbz#1314043)
* Wed Feb 07 2018 Iryna Shcherbina <ishcherb@redhat.com> - 2.0.7-6
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Dec 28 2016 Adam Williamson <awilliam@redhat.com> - 2.0.7-2
- fix build on Rawhide (hack out more pinned deps in setup.py)
* Thu Dec 22 2016 Miro HronĨok <mhroncok@redhat.com>
- Rebuild for Python 3.6
* Tue Aug 16 2016 Ricky Elrod <relrod@redhat.com> - 2.0.7-1
- Latest pypi release.
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-7
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 7 2014 Ricky Elrod <relrod@redhat.com> - 1.1.4-4
- f21 has PyYAML 3.11, so we need to loosen the setuptools check a bit.
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu Nov 7 2013 Ricky Elrod <codeblock@fedoraproject.org> - 1.1.4-2
- Fix 'requests' sed to fix the build on Fedora.
* Tue Nov 5 2013 Ricky Elrod <codeblock@fedoraproject.org> - 1.1.4-1
- Latest upstream version.
* Sat Oct 26 2013 Ricky Elrod <codeblock@fedoraproject.org> - 1.1.3-2
- Fix files section (use vars instead of hardcoding)
* Sat Oct 26 2013 Ricky Elrod <codeblock@fedoraproject.org> - 1.1.3-1
- Latest upstream version.
* Mon Oct 21 2013 Ricky Elrod <codeblock@fedoraproject.org> - 1.0.2-5
- Fix files section for RHEL (no manpage).
* Sat Oct 19 2013 Ricky Elrod <codeblock@fedoraproject.org> - 1.0.2-4
- Make it noarch.
* Sat Oct 19 2013 Ricky Elrod <codeblock@fedoraproject.org> - 1.0.2-3
- Add missing BuildRequires for setuptools.
- Add missing BuildRequires for help2man to run successfully.
* Sat Oct 19 2013 Ricky Elrod <codeblock@fedoraproject.org> - 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 <codeblock@fedoraproject.org> - 1.0.2-1
- Initial build.