2019-08-29 12:43:06 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-charset-normalizer
|
|
|
|
#
|
2023-03-26 22:04:47 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2019-08-29 12:43:06 +02: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.
|
|
|
|
|
2019-08-30 02:46:24 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2019-08-29 12:43:06 +02:00
|
|
|
|
|
|
|
|
2023-05-05 08:41:30 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2019-08-29 12:43:06 +02:00
|
|
|
Name: python-charset-normalizer
|
2023-03-26 22:04:47 +02:00
|
|
|
Version: 3.1.0
|
2019-08-29 12:43:06 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Python Universal Charset detector
|
2019-08-30 02:46:24 +02:00
|
|
|
License: MIT
|
|
|
|
URL: https://github.com/ousret/charset_normalizer
|
2021-10-26 22:41:42 +02:00
|
|
|
Source: https://github.com/Ousret/charset_normalizer/archive/refs/tags/%{version}.tar.gz#/charset_normalizer-%{version}.tar.gz
|
2023-03-26 22:04:47 +02:00
|
|
|
BuildRequires: %{python_module base >= 3.7}
|
2019-08-29 12:43:06 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
BuildRequires: fdupes
|
2019-08-30 02:46:24 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2020-05-25 15:36:05 +02:00
|
|
|
Requires(post): update-alternatives
|
2021-05-20 11:54:40 +02:00
|
|
|
Requires(postun):update-alternatives
|
2021-02-10 09:09:39 +01:00
|
|
|
Suggests: python-unicodedata2
|
2019-08-29 12:43:06 +02:00
|
|
|
BuildArch: noarch
|
2019-08-30 02:46:24 +02:00
|
|
|
# SECTION test requirements
|
2021-02-10 09:09:39 +01:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-08-30 02:46:24 +02:00
|
|
|
# /SECTION
|
2019-08-29 12:43:06 +02:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Python Universal Charset detector.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n charset_normalizer-%{version}
|
2022-08-19 08:47:38 +02:00
|
|
|
# remove code coverage flags from pytest
|
|
|
|
sed -i '/addopts/d' setup.cfg
|
2019-08-29 12:43:06 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
2020-05-25 15:36:05 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/normalizer
|
2019-08-29 12:43:06 +02:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
2021-02-10 09:09:39 +01:00
|
|
|
%pytest
|
2019-08-29 12:43:06 +02:00
|
|
|
|
2020-05-25 15:36:05 +02:00
|
|
|
%post
|
|
|
|
%python_install_alternative normalizer
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative normalizer
|
|
|
|
|
2019-08-29 12:43:06 +02:00
|
|
|
%files %{python_files}
|
|
|
|
%doc README.md
|
|
|
|
%license LICENSE
|
2020-05-25 15:36:05 +02:00
|
|
|
%python_alternative %{_bindir}/normalizer
|
2022-08-19 08:47:38 +02:00
|
|
|
%{python_sitelib}/charset_normalizer
|
|
|
|
%{python_sitelib}/charset_normalizer-%{version}*-info
|
2019-08-29 12:43:06 +02:00
|
|
|
|
|
|
|
%changelog
|