|
|
|
@ -1,87 +1,104 @@
|
|
|
|
|
%global pypi_name chardet
|
|
|
|
|
Name: python-%{pypi_name}
|
|
|
|
|
Version: 3.0.4
|
|
|
|
|
Release: 19%{?dist}
|
|
|
|
|
Name: python-chardet
|
|
|
|
|
Version: 4.0.0
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Summary: Character encoding auto-detection in Python
|
|
|
|
|
License: LGPLv2
|
|
|
|
|
URL: https://github.com/%{pypi_name}/%{pypi_name}
|
|
|
|
|
Source0: %pypi_source
|
|
|
|
|
|
|
|
|
|
# pytest 4 support
|
|
|
|
|
Patch1: https://github.com/chardet/chardet/pull/174.patch
|
|
|
|
|
URL: https://github.com/chardet/chardet
|
|
|
|
|
Source0: %{pypi_source chardet}
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# Exclude i686 arch. Due to a modularity issue it's being added to the
|
|
|
|
|
# x86_64 compose of CRB, but we don't want to ship it at all.
|
|
|
|
|
# See: https://projects.engineering.redhat.com/browse/RCM-72605
|
|
|
|
|
ExcludeArch: i686
|
|
|
|
|
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-devel
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-rpm-macros
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: pyproject-rpm-macros
|
|
|
|
|
|
|
|
|
|
# Circular dependency on pytest
|
|
|
|
|
%bcond_without tests
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python%{python3_pkgversion}-pytest
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global _description\
|
|
|
|
|
Character encoding auto-detection in Python. As\
|
|
|
|
|
smart as your browser. Open source.
|
|
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
%package -n python%{python3_pkgversion}-%{pypi_name}
|
|
|
|
|
|
|
|
|
|
%package -n python3-chardet
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
|
|
|
|
|
Requires: python%{python3_pkgversion}-setuptools
|
|
|
|
|
|
|
|
|
|
%description -n python%{python3_pkgversion}-%{pypi_name} %_description
|
|
|
|
|
%description -n python3-chardet %_description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p1 -n %{pypi_name}-%{version}
|
|
|
|
|
sed -ie '1d' %{pypi_name}/cli/chardetect.py
|
|
|
|
|
%autosetup -p1 -n chardet-%{version}
|
|
|
|
|
|
|
|
|
|
# Remove useless shebangs
|
|
|
|
|
# https://github.com/chardet/chardet/commit/1e94b33329
|
|
|
|
|
grep -lr "^#\!/usr/bin/env python" chardet/ | xargs sed -i "1d"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
|
%pyproject_buildrequires -r
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%py3_build
|
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%py3_install
|
|
|
|
|
mv %{buildroot}%{_bindir}/chardetect %{buildroot}%{_bindir}/chardetect-%{python3_version}
|
|
|
|
|
%pyproject_install
|
|
|
|
|
%pyproject_save_files chardet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
%{__python3} -m pytest -v
|
|
|
|
|
%pytest -v
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python%{python3_pkgversion}-%{pypi_name}
|
|
|
|
|
|
|
|
|
|
%files -n python3-chardet -f %{pyproject_files}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.rst
|
|
|
|
|
%{python3_sitelib}/%{pypi_name}/
|
|
|
|
|
%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info/
|
|
|
|
|
%{_bindir}/chardetect-%{python3_version}
|
|
|
|
|
%{_bindir}/chardetect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Apr 03 2024 MSVSphere Packaging Team <packager@msvsphere-os.ru> - 3.0.4-19
|
|
|
|
|
- Rebuilt for MSVSphere 8.10 beta
|
|
|
|
|
* Mon Feb 21 2022 Tomas Orsava <torsava@redhat.com> - 4.0.0-5
|
|
|
|
|
- Add gating configuration and a simple smoke test
|
|
|
|
|
- Related: rhbz#1950291
|
|
|
|
|
|
|
|
|
|
* Tue Feb 08 2022 Tomas Orsava <torsava@redhat.com> - 4.0.0-4
|
|
|
|
|
- Add automatically generated Obsoletes tag with the python39- prefix
|
|
|
|
|
for smoother upgrade from RHEL8
|
|
|
|
|
- Related: rhbz#1990421
|
|
|
|
|
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 4.0.0-3
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 4.0.0-2
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Fri Feb 05 2021 Miro Hrončok <mhroncok@redhat.com> - 4.0.0-1
|
|
|
|
|
- Update to 4.0.0
|
|
|
|
|
- Fixes: rhbz#1906585
|
|
|
|
|
- Fixes: rhbz#1923076
|
|
|
|
|
|
|
|
|
|
* Fri Dec 13 2019 Tomas Orsava <torsava@redhat.com> - 3.0.4-19
|
|
|
|
|
- Exclude unsupported i686 arch
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-19
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Nov 28 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-18
|
|
|
|
|
- Chardet requires setuptools
|
|
|
|
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-18
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Nov 22 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-17
|
|
|
|
|
- Renamed chardetect → chardetect-3.8
|
|
|
|
|
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-17
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Wed Nov 20 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-16
|
|
|
|
|
- Rebuild with tests
|
|
|
|
|
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-16
|
|
|
|
|
- Bootstrap for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Tue Nov 19 2019 Lumír Balhar <lbalhar@redhat.com> - 3.0.4-15
|
|
|
|
|
- Adjusted for Python 3.8 module in RHEL 8
|
|
|
|
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-15
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Nov 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-14
|
|
|
|
|
- Subpackage python2-chardet has been removed
|
|
|
|
|