RHEL: Convert from Fedora for the Python 3.11 stack in RHEL

Resolves: rhbz#2157704
This commit is contained in:
Charalampos Stratakis 2022-11-29 02:05:58 +01:00
parent 57af3c87d4
commit eead3937bf
1 changed files with 20 additions and 67 deletions

View File

@ -1,6 +1,9 @@
Name: python-charset-normalizer
%global __python3 /usr/bin/python3.11
%global python3_pkgversion 3.11
Name: python%{python3_pkgversion}-charset-normalizer
Version: 2.1.0
Release: 2%{?dist}
Release: 1%{?dist}
Summary: The Real First Universal Charset Detector
License: MIT
@ -8,9 +11,10 @@ URL: https://github.com/ousret/charset_normalizer
Source0: %{url}/archive/refs/tags/%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: pyproject-rpm-macros
BuildRequires: python3dist(pytest)
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-rpm-macros
BuildRequires: python%{python3_pkgversion}-setuptools
BuildRequires: python%{python3_pkgversion}-pytest
%description
@ -19,83 +23,32 @@ Motivated by chardet, trying to resolve the issue by taking
a new approach. All IANA character set names for which the Python core
library provides codecs are supported.
%package -n python3-charset-normalizer
Summary: %{summary}
%description -n python3-charset-normalizer
A library that helps you read text from an unknown charset encoding.
Motivated by chardet, trying to resolve the issue by taking
a new approach. All IANA character set names for which the Python core
library provides codecs are supported.
%prep
%autosetup -n charset_normalizer-%{version}
# Remove pytest-cov settings from setup.cfg
sed -i "/addopts = --cov/d" setup.cfg
%generate_buildrequires
%pyproject_buildrequires -r
%build
%pyproject_wheel
%py3_build
%install
%pyproject_install
%pyproject_save_files charset_normalizer
%py3_install
mv %{buildroot}%{_bindir}/normalizer{,-%{python3_version}}
%check
%pytest
%files -n python3-charset-normalizer -f %{pyproject_files}
%files -n python%{python3_pkgversion}-charset-normalizer
%license LICENSE
%doc README.md
%{_bindir}/normalizer
%{_bindir}/normalizer-%{python3_pkgversion}
%{python3_sitelib}/charset_normalizer/
%{python3_sitelib}/charset_normalizer-%{version}-py%{python3_pkgversion}.egg-info/
%changelog
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jun 20 2022 Lumír Balhar <lbalhar@redhat.com> - 2.1.0-1
- Update to 2.1.0
Resolves: rhbz#2098481
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.0.12-2
- Rebuilt for Python 3.11
* Mon Feb 14 2022 Lumír Balhar <lbalhar@redhat.com> - 2.0.12-1
- Update to 2.0.12
Resolves: rhbz#2053838
* Mon Jan 31 2022 Lumír Balhar <lbalhar@redhat.com> - 2.0.11-1
- Update to 2.0.11
Resolves: rhbz#2048279
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jan 05 2022 Lumír Balhar <lbalhar@redhat.com> - 2.0.10-1
- Update to 2.0.10
Resolves: rhbz#2037079
* Fri Dec 17 2021 Lumír Balhar <lbalhar@redhat.com> - 2.0.9-1
- Update to 2.0.9
Resolves: rhbz#2028947
* Mon Nov 29 2021 Lumír Balhar <lbalhar@redhat.com> - 2.0.8-1
- Update to 2.0.8
Resolves: rhbz#2026482
* Thu Oct 14 2021 Lumír Balhar <lbalhar@redhat.com> - 2.0.7-1
- Update to 2.0.7
Resolves: rhbz#2013031
* Mon Sep 20 2021 Lumír Balhar <lbalhar@redhat.com> - 2.0.6-1
- Update to 2.0.6
Resolves: rhbz#2004262
* Mon Aug 02 2021 Lumír Balhar <lbalhar@redhat.com> - 2.0.4-1
- Update to 2.0.4
Resolves: rhbz#1988575
* Wed Jul 21 2021 Lumír Balhar <lbalhar@redhat.com> - 2.0.3-1
* Mon Oct 24 2022 Charalampos Stratakis <cstratak@redhat.com> - 2.1.0-1
- Initial package
- Fedora contributions by:
Gwyn Ciesla <limb@fedoraproject.org>
Lumir Balhar <lbalhar@redhat.com>