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

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