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

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