|
|
|
@ -1,16 +1,21 @@
|
|
|
|
|
%global pypi_name chardet
|
|
|
|
|
Name: python-%{pypi_name}
|
|
|
|
|
Version: 3.0.4
|
|
|
|
|
Release: 7%{?dist}
|
|
|
|
|
Name: python-chardet
|
|
|
|
|
Version: 4.0.0
|
|
|
|
|
Release: 5%{?dist}
|
|
|
|
|
Summary: Character encoding auto-detection in Python
|
|
|
|
|
|
|
|
|
|
Group: Development/Languages
|
|
|
|
|
License: LGPLv2
|
|
|
|
|
URL: https://github.com/%{pypi_name}/%{pypi_name}
|
|
|
|
|
Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
|
|
|
|
URL: https://github.com/chardet/chardet
|
|
|
|
|
Source0: %{pypi_source chardet}
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: python3-devel, python3-setuptools
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: pyproject-rpm-macros
|
|
|
|
|
|
|
|
|
|
# Circular dependency on pytest
|
|
|
|
|
%bcond_without tests
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%global _description\
|
|
|
|
|
Character encoding auto-detection in Python. As\
|
|
|
|
@ -18,41 +23,110 @@ smart as your browser. Open source.
|
|
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
%package -n python3-%{pypi_name}
|
|
|
|
|
Summary: Character encoding auto-detection in Python 3
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{pypi_name}
|
|
|
|
|
Character encoding auto-detection in Python. As
|
|
|
|
|
smart as your browser. Open source.
|
|
|
|
|
%package -n python3-chardet
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
|
|
%description -n python3-chardet %_description
|
|
|
|
|
|
|
|
|
|
Python 3 version.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -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
|
|
|
|
|
%pyproject_install
|
|
|
|
|
%pyproject_save_files chardet
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
%check
|
|
|
|
|
%pytest -v
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{pypi_name}
|
|
|
|
|
%{!?_licensedir:%global license %%doc}
|
|
|
|
|
|
|
|
|
|
%files -n python3-chardet -f %{pyproject_files}
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%doc README.rst
|
|
|
|
|
%{python3_sitelib}/*
|
|
|
|
|
%{_bindir}/chardetect
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Jul 11 2018 Petr Viktorin <pviktori@redhat.com> - 3.0.4-7
|
|
|
|
|
- Remove the Python 2 subpackage
|
|
|
|
|
https://bugzilla.redhat.com/show_bug.cgi?id=1590397
|
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-19
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* 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 May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-17
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-16
|
|
|
|
|
- Bootstrap for Python 3.9
|
|
|
|
|
|
|
|
|
|
* 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
|
|
|
|
|
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
|
|
|
|
|
|
|
|
|
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-13
|
|
|
|
|
- Rebuilt for Python 3.8.0rc1 (#1748018)
|
|
|
|
|
|
|
|
|
|
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-12
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
|
|
|
|
|
* Wed Aug 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-11
|
|
|
|
|
- Bootstrap for Python 3.8
|
|
|
|
|
|
|
|
|
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-10
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-9
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Fri Aug 17 2018 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-8
|
|
|
|
|
- Only have one /usr/bin/chardetect
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.4-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jun 25 2018 Petr Viktorin <pviktori@redhat.com> - 3.0.4-6
|
|
|
|
|
- Allow Python 2 for build
|
|
|
|
|
see https://hurl.corp.redhat.com/rhel8-py2
|
|
|
|
|
* Wed Jun 13 2018 Miro Hrončok <mhroncok@redhat.com> - 3.0.4-6
|
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
|
|
|
|
|
* Sun Feb 11 2018 Iryna Shcherbina <ishcherb@redhat.com> - 3.0.4-5
|
|
|
|
|
- Update Python 2 dependency declarations to new packaging standards
|
|
|
|
|