72 lines
2.1 KiB
RPMSpec
72 lines
2.1 KiB
RPMSpec
## START: Set by rpmautospec
|
|
## (rpmautospec version 0.6.5)
|
|
## RPMAUTOSPEC: autorelease, autochangelog
|
|
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
|
release_number = 1;
|
|
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
|
|
print(release_number + base_release_number - 1);
|
|
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
|
|
## END: Set by rpmautospec
|
|
|
|
%global python3_pkgversion 3.14
|
|
|
|
Name: python%{python3_pkgversion}-charset-normalizer
|
|
Version: 3.4.4
|
|
Release: %autorelease
|
|
Summary: The Real First Universal Charset Detector
|
|
# SPDX
|
|
License: MIT
|
|
URL: https://github.com/ousret/charset_normalizer
|
|
Source0: %{url}/archive/refs/tags/%{version}.tar.gz
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
BuildRequires: pyproject-rpm-macros
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
|
|
|
%description
|
|
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}
|
|
# Drop mypy from build dependencies
|
|
sed -i 's/"mypy.*"//' pyproject.toml
|
|
|
|
%generate_buildrequires
|
|
%pyproject_buildrequires -r
|
|
|
|
%build
|
|
%pyproject_wheel
|
|
|
|
%install
|
|
%pyproject_install
|
|
%pyproject_save_files charset_normalizer
|
|
mv %{buildroot}%{_bindir}/normalizer{,-%{python3_version}}
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%files -n python%{python3_pkgversion}-charset-normalizer -f %{pyproject_files}
|
|
%license LICENSE
|
|
%doc README.md
|
|
%{_bindir}/normalizer-%{python3_pkgversion}
|
|
|
|
%changelog
|
|
## START: Generated by rpmautospec
|
|
* Fri Nov 28 2025 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.4.4-1
|
|
- Update to 3.4.4 - taken from Fedora cf7f8a9
|
|
|
|
* Fri Nov 28 2025 Lukáš Zachar <lzachar@redhat.com> - 3.4.3-3
|
|
- Add gating.yaml
|
|
|
|
* Fri Nov 28 2025 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.4.3-2
|
|
- Convert from Fedora for the Python 3.14 stack in RHEL
|
|
|
|
* Fri Nov 28 2025 Tomáš Hrnčiar <thrnciar@redhat.com> - 3.4.3-1
|
|
- RHEL: Rename SPEC to python3.14-charset-normalizer.spec
|
|
## END: Generated by rpmautospec
|