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