2016-06-24 08:19:18 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-tldextract
|
|
|
|
#
|
2022-06-15 16:40:32 +00:00
|
|
|
# Copyright (c) 2022 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
|
|
|
#
|
|
|
|
|
|
|
|
|
2018-02-07 12:00:14 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2021-02-06 00:10:02 +00:00
|
|
|
%define skip_python2 1
|
|
|
|
%define oldpython python
|
2016-06-24 08:19:18 +00:00
|
|
|
Name: python-tldextract
|
2022-11-10 09:06:56 +00:00
|
|
|
Version: 3.4.0
|
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}
|
|
|
|
BuildRequires: %{python_module requests >= 2.1.0}
|
2021-10-01 07:44:58 +00:00
|
|
|
BuildRequires: %{python_module requests-file >= 1.4}
|
2021-02-06 00:10:02 +00:00
|
|
|
BuildRequires: %{python_module setuptools_scm}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
### SECTION test requirements
|
2019-03-10 20:27:50 +00:00
|
|
|
BuildRequires: %{python_module pytest-mock}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module responses}
|
2021-02-06 00:10:02 +00:00
|
|
|
### /SECTION test requirements
|
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-03-11 11:46:24 +00:00
|
|
|
Requires: python-setuptools
|
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
|
|
|
|
%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
|
2020-03-11 11:46:24 +00:00
|
|
|
sed -i 's:--pylint::' pytest.ini
|
2018-02-07 12:00:14 +00:00
|
|
|
%python_build
|
2016-06-24 08:19:18 +00:00
|
|
|
|
|
|
|
%install
|
2018-02-07 12:00:14 +00:00
|
|
|
%python_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
|
|
|
|
%python_exec setup.py develop --user
|
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
|
|
|
|
%{python_sitelib}/*
|
2020-05-18 12:16:11 +00:00
|
|
|
%python_alternative %{_bindir}/tldextract
|
2016-06-24 08:19:18 +00:00
|
|
|
|
|
|
|
%changelog
|