Blame SPECS/python3.11-charset-normalizer.spec

0fcc4d
%global __python3 /usr/bin/python3.11
0fcc4d
%global python3_pkgversion 3.11
0fcc4d
0fcc4d
Name:           python%{python3_pkgversion}-charset-normalizer
0fcc4d
Version:        2.1.0
0fcc4d
Release:        1%{?dist}
0fcc4d
Summary:        The Real First Universal Charset Detector
0fcc4d
0fcc4d
License:        MIT
0fcc4d
URL:            https://github.com/ousret/charset_normalizer
0fcc4d
Source0:        %{url}/archive/refs/tags/%{version}.tar.gz
0fcc4d
BuildArch:      noarch
0fcc4d
0fcc4d
BuildRequires:  python%{python3_pkgversion}-devel
0fcc4d
BuildRequires:  python%{python3_pkgversion}-rpm-macros
0fcc4d
BuildRequires:  python%{python3_pkgversion}-setuptools
0fcc4d
BuildRequires:  python%{python3_pkgversion}-pytest
0fcc4d
0fcc4d
0fcc4d
%description
0fcc4d
A library that helps you read text from an unknown charset encoding.
0fcc4d
Motivated by chardet, trying to resolve the issue by taking
0fcc4d
a new approach. All IANA character set names for which the Python core
0fcc4d
library provides codecs are supported.
0fcc4d
0fcc4d
0fcc4d
%prep
0fcc4d
%autosetup -n charset_normalizer-%{version}
0fcc4d
# Remove pytest-cov settings from setup.cfg
0fcc4d
sed -i "/addopts = --cov/d" setup.cfg
0fcc4d
0fcc4d
%build
0fcc4d
%py3_build
0fcc4d
0fcc4d
%install
0fcc4d
%py3_install
0fcc4d
mv %{buildroot}%{_bindir}/normalizer{,-%{python3_version}}
0fcc4d
0fcc4d
%check
0fcc4d
%pytest
0fcc4d
0fcc4d
%files -n python%{python3_pkgversion}-charset-normalizer
0fcc4d
%license LICENSE
0fcc4d
%doc README.md
0fcc4d
%{_bindir}/normalizer-%{python3_pkgversion}
0fcc4d
%{python3_sitelib}/charset_normalizer/
0fcc4d
%{python3_sitelib}/charset_normalizer-%{version}-py%{python3_pkgversion}.egg-info/
0fcc4d
0fcc4d
%changelog
0fcc4d
* Mon Oct 24 2022 Charalampos Stratakis <cstratak@redhat.com> - 2.1.0-1
0fcc4d
- Initial package
0fcc4d
- Fedora contributions by:
0fcc4d
      Gwyn Ciesla <limb@fedoraproject.org>
0fcc4d
      Lumir Balhar <lbalhar@redhat.com>