2016-06-24 08:19:18 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-tldextract
|
|
|
|
#
|
2023-05-04 13:20:34 +00:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2016-06-24 08:19:18 +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.
|
|
|
|
|
2018-12-04 14:10:05 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-06-24 08:19:18 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-02-06 00:10:02 +00:00
|
|
|
%define oldpython python
|
2016-06-24 08:19:18 +00:00
|
|
|
Name: python-tldextract
|
2023-10-23 01:08:57 +00:00
|
|
|
Version: 5.0.1
|
2016-06-24 08:19:18 +00:00
|
|
|
Release: 0
|
2018-04-16 16:04:18 +00:00
|
|
|
Summary: Python module to separate the TLD of a URL
|
2018-02-07 12:00:14 +00:00
|
|
|
License: BSD-3-Clause
|
|
|
|
Group: Development/Languages/Python
|
2020-03-11 11:46:24 +00:00
|
|
|
URL: https://github.com/john-kurkowski/tldextract
|
2018-02-07 12:00:14 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/t/tldextract/tldextract-%{version}.tar.gz
|
|
|
|
Source1: %{name}-rpmlintrc
|
2021-02-06 00:10:02 +00:00
|
|
|
BuildRequires: %{python_module filelock >= 3.0.8}
|
|
|
|
BuildRequires: %{python_module idna >= 2.1.0}
|
2023-10-23 01:08:57 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
|
|
|
BuildRequires: %{python_module pytest-mock}
|
|
|
|
BuildRequires: %{python_module pytest}
|
2021-02-06 00:10:02 +00:00
|
|
|
BuildRequires: %{python_module requests >= 2.1.0}
|
2021-10-01 07:44:58 +00:00
|
|
|
BuildRequires: %{python_module requests-file >= 1.4}
|
2023-10-23 01:08:57 +00:00
|
|
|
BuildRequires: %{python_module responses}
|
2021-02-06 00:10:02 +00:00
|
|
|
BuildRequires: %{python_module setuptools_scm}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-05-04 13:20:34 +00:00
|
|
|
BuildRequires: %{python_module six}
|
|
|
|
BuildRequires: %{python_module wheel}
|
2016-06-24 08:19:18 +00:00
|
|
|
BuildRequires: fdupes
|
2018-02-07 12:00:14 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-10-20 22:54:55 +00:00
|
|
|
Requires: python-filelock >= 3.0.8
|
2016-06-24 08:19:18 +00:00
|
|
|
Requires: python-idna >= 2.1.0
|
|
|
|
Requires: python-requests >= 2.1.0
|
|
|
|
Requires: python-requests-file >= 1.4
|
2020-05-18 12:16:11 +00:00
|
|
|
Requires(post): update-alternatives
|
2021-10-01 07:44:58 +00:00
|
|
|
Requires(postun):update-alternatives
|
2021-02-06 00:10:02 +00:00
|
|
|
Obsoletes: %{oldpython}-tldextract <= 2.0.1
|
2018-02-07 12:00:14 +00:00
|
|
|
BuildArch: noarch
|
2023-10-23 01:08:57 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2018-02-07 12:00:14 +00:00
|
|
|
%python_subpackages
|
2016-06-24 08:19:18 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
tldextract accurately separates the gTLD or ccTLD (generic or country code
|
2018-02-07 12:00:14 +00:00
|
|
|
top-level domain) from the registered domain and subdomains of a URL, using the
|
|
|
|
Public Suffix List. By default, this includes the public ICANN TLDs and their
|
|
|
|
exceptions. You can optionally support the Public Suffix List's private domains
|
|
|
|
as well.
|
2016-06-24 08:19:18 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n tldextract-%{version}
|
|
|
|
|
|
|
|
%build
|
2023-10-23 01:08:57 +00:00
|
|
|
%pyproject_wheel
|
2016-06-24 08:19:18 +00:00
|
|
|
|
|
|
|
%install
|
2023-10-23 01:08:57 +00:00
|
|
|
%pyproject_install
|
2020-05-18 12:16:11 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/tldextract
|
2018-02-07 12:00:14 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2016-06-24 08:19:18 +00:00
|
|
|
|
2019-03-10 20:27:50 +00:00
|
|
|
%check
|
2020-03-11 11:46:24 +00:00
|
|
|
%pytest tests
|
2019-03-10 20:27:50 +00:00
|
|
|
|
2020-05-18 12:16:11 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative tldextract
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative tldextract
|
|
|
|
|
2018-02-07 12:00:14 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
2023-05-04 13:20:34 +00:00
|
|
|
%{python_sitelib}/tldextract*
|
2020-05-18 12:16:11 +00:00
|
|
|
%python_alternative %{_bindir}/tldextract
|
2016-06-24 08:19:18 +00:00
|
|
|
|
|
|
|
%changelog
|