forked from pool/python-publicsuffixlist
- Use @typing.overload to indicate str-to-str domain input/output. #32. - Address deprecation of ByteString in python 3.14. - update to version 1.0.1: - Fix internal logic where domain name passed as a tuple of bytes, that contains UTF-8 encoded non-ascii chars, unintentionally matched PSL. Fixes #31. - update to version 1.0.0: - This version drops support for Python 2.x and 3.4. - The internal logic has been slightly changed to address conflicting evaluation rules between the PSL wiki and the test data. As with versions before 1.0.0, this module assumes that wildcards have implicit public declarations on the wildcard root. - With the minimum Python version changed to 3.5, type annotations have been added to exposed API methods to clarify expected input types. For example, psl.publicsuffix() now accepts `str` or `Tuple[bytes, ...]`. - Add tuple of bytes style input - Add keep_case keyword argument - Accept trailing dot - Migrate CI to GitHub Actions OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-publicsuffixlist?expand=0&rev=47
73 lines
2.2 KiB
RPMSpec
73 lines
2.2 KiB
RPMSpec
#
|
|
# spec file for package python-publicsuffixlist
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-publicsuffixlist
|
|
Version: 1.0.2.20240903
|
|
Release: 0
|
|
Summary: Public suffix list implementaion in Python
|
|
License: MPL-2.0
|
|
URL: https://github.com/ko-zu/psl
|
|
Source: https://files.pythonhosted.org/packages/source/p/publicsuffixlist/publicsuffixlist-%{version}.tar.gz
|
|
# PATCH-FIX-OPENSUSE change_psl_location.patch -- use list from publicsuffix package
|
|
Patch0: change_psl_location.patch
|
|
BuildRequires: %{python_module pip}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module wheel}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
# SECTION tests
|
|
BuildRequires: publicsuffix
|
|
# /SECTION
|
|
Requires: publicsuffix
|
|
Recommends: python-requests
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
%description
|
|
Parser implementation for the Public Suffix List <https://publicsuffix.org/> in Python.
|
|
|
|
Support for IDN (unicode or punycoded).
|
|
|
|
%prep
|
|
%autosetup -p1 -n publicsuffixlist-%{version}
|
|
sed -i '/public_suffix_list\.dat/ d' setup.py
|
|
rm publicsuffixlist/update.py
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
rm %{buildroot}%{_bindir}/publicsuffixlist-download
|
|
%{python_expand rm -f %{buildroot}%{$python_sitelib}/publicsuffixlist/test* %{buildroot}%{$python_sitelib}/publicsuffixlist/__pycache__/test*
|
|
%fdupes %{buildroot}%{$python_sitelib}
|
|
}
|
|
|
|
%check
|
|
%pyunittest discover -v
|
|
|
|
%files %{python_files}
|
|
%doc README.md
|
|
%license LICENSE
|
|
%{python_sitelib}/publicsuffixlist
|
|
%{python_sitelib}/publicsuffixlist-%{version}.dist-info
|
|
|
|
%changelog
|