2017-12-12 08:28:51 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-tld
|
|
|
|
#
|
2018-04-07 19:19:39 +00:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2017-12-12 08:28:51 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
2018-04-07 19:19:39 +00:00
|
|
|
#
|
2017-12-12 08:28:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-tld
|
2018-07-09 20:33:11 +00:00
|
|
|
Version: 0.9.1
|
2017-12-12 08:28:51 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Extract the top level domain (TLD) from the URL given
|
2018-04-07 19:19:39 +00:00
|
|
|
License: MPL-1.1 OR GPL-2.0-only OR LGPL-2.1-only
|
2017-12-12 08:28:51 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-04-07 19:19:39 +00:00
|
|
|
Url: https://github.com/barseghyanartur/tld
|
2017-12-12 08:28:51 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/t/tld/tld-%{version}.tar.gz
|
2018-07-07 08:33:43 +00:00
|
|
|
# PATCH-FIX-OPENSUSE remove-download-test.patch
|
|
|
|
Patch0: remove-download-test.patch
|
2017-12-12 08:28:51 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-04-07 19:19:39 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2017-12-12 08:28:51 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module six >= 1.9}
|
|
|
|
# /SECTION
|
|
|
|
BuildRequires: fdupes
|
|
|
|
Requires: python-six >= 1.9
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Extract the top level domain (TLD) from the URL given. List of TLD names is
|
2018-07-07 08:33:43 +00:00
|
|
|
taken from Mozillas public suffix list:
|
|
|
|
<https://publicsuffix.org/list/effective_tld_names.dat>
|
2017-12-12 08:28:51 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n tld-%{version}
|
|
|
|
sed -i '1s/^#!.*/#!\/usr\/bin\/python3/' src/tld/bin/update-tld-names
|
2018-07-07 08:33:43 +00:00
|
|
|
%patch0 -p1
|
2017-12-12 08:28:51 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2018-07-09 20:33:11 +00:00
|
|
|
%{python_expand chmod -x %{buildroot}%{$python_sitelib}/tld/res/old/effective_tld_names-2015-07-19.dat.txt}
|
2017-12-12 08:28:51 +00:00
|
|
|
|
|
|
|
%check
|
|
|
|
%python_exec setup.py test
|
|
|
|
|
|
|
|
%files %{python_files}
|
2018-04-07 20:46:18 +00:00
|
|
|
%doc README.rst CHANGELOG.rst
|
2018-04-07 19:19:39 +00:00
|
|
|
%license LICENSE_GPL2.0.txt LICENSE_LGPL_2.1.txt
|
2017-12-12 08:28:51 +00:00
|
|
|
%python3_only %{_bindir}/update-tld-names
|
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|