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

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