%global pypiname tld
Name: python-%{pypiname}
Version: 0.7.9
Release: 9%{?dist}
Summary: Extract the top level domain from the URL given
License: MPL or GPLv2 or LGPLv2
URL: https://github.com/barseghyanartur/tld
Source0: https://files.pythonhosted.org/packages/source/t/%{pypiname}/%{pypiname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-six
%description
Extract the top level domain (TLD) from the URL given. List
of TLD names is taken from Mozilla.
%package -n python3-%{pypiname}
Summary: Extract the top level domain from the URL given
Requires: python3-six
%{?python_provide:%python_provide python3-%{pypiname}}
%description -n python3-%{pypiname}
Extract the top level domain (TLD) from the URL given. List
of TLD names is taken from Mozilla.
%prep
%setup -q -n %{pypiname}-%{version}
# Change shebang according to Python version
sed -i '1s=^#!/usr/bin/\(python\|env python\)[0-9.]*=#!%{__python3}=' src/tld/bin/update-tld-names
%build
%py3_build
%install
%py3_install
# Please see:
# https://github.com/barseghyanartur/tld/pull/22
%files -n python3-%{pypiname}
%{python3_sitelib}/%{pypiname}*
%{_bindir}/*
%changelog
* Fri Oct 12 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.7.9-9
- Python2 binary package has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sat Jun 23 2018 William Moreno Reyes <williamjmorenor@gmail.com> - 0.7.9-7
- Update license tag
- https://github.com/barseghyanartur/tld/issues/46
- https://bugzilla.redhat.com/show_bug.cgi?id=1577466
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.7.9-6
- Rebuilt for Python 3.7
* Fri Mar 16 2018 Jan Beran <jberan@redhat.com> - 0.7.9-5
- Fix of python3-tld requires both Python 2 and Python 3 (rhbz #1546814)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.9-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Sat Jan 06 2018 williamjmorenor@gmail.com - 0.7.9-3
- Fix python2 subpackage requeriments
* Sat Jan 06 2018 williamjmorenor@gmail.com - 0.7.9-2
- Initial import BZ#1529024
* Mon Dec 25 2017 williamjmorenor@gmail.com - 0.7.9-1
- Initial packaging