|
|
@ -1,45 +1,80 @@
|
|
|
|
|
|
|
|
## START: Set by rpmautospec
|
|
|
|
|
|
|
|
## (rpmautospec version 0.6.5)
|
|
|
|
|
|
|
|
## RPMAUTOSPEC: autorelease, autochangelog
|
|
|
|
|
|
|
|
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
|
|
|
|
|
|
|
|
release_number = 15;
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
Name: python-chardet
|
|
|
|
Name: python-chardet
|
|
|
|
Version: 4.0.0
|
|
|
|
Version: 5.2.0
|
|
|
|
Release: 5%{?dist}
|
|
|
|
Release: %autorelease
|
|
|
|
Summary: Character encoding auto-detection in Python
|
|
|
|
Summary: Python character encoding detector
|
|
|
|
License: LGPLv2
|
|
|
|
|
|
|
|
|
|
|
|
# The entire source, after tests/ are filtered, is LGPL-2.0-or-later. See the
|
|
|
|
|
|
|
|
# comment above Source0 for more details on tests/.
|
|
|
|
|
|
|
|
License: LGPL-2.0-or-later
|
|
|
|
URL: https://github.com/chardet/chardet
|
|
|
|
URL: https://github.com/chardet/chardet
|
|
|
|
Source0: %{pypi_source chardet}
|
|
|
|
# A filtered source tarball, obtained by (see Source1):
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# ./get_source %%{version}
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# is required because the contents of tests/ are under various undocumented
|
|
|
|
|
|
|
|
# licenses and are, for the most part, not freely redistributable. See:
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
# problematic licensing of /tests?
|
|
|
|
|
|
|
|
# https://github.com/chardet/chardet/issues/231
|
|
|
|
|
|
|
|
Source0: chardet-%{version}-filtered.tar.zst
|
|
|
|
|
|
|
|
Source1: get_source
|
|
|
|
|
|
|
|
# Hand-written for Fedora in groff_man(7) format based on --help output
|
|
|
|
|
|
|
|
Source2: chardetect.1
|
|
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: pyproject-rpm-macros
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Circular dependency on pytest
|
|
|
|
%global common_description %{expand:
|
|
|
|
%bcond_without tests
|
|
|
|
Chardet: The Universal Character Encoding Detector
|
|
|
|
%if %{with tests}
|
|
|
|
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
Detects:
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%global _description\
|
|
|
|
• ASCII, UTF-8, UTF-16 (2 variants), UTF-32 (4 variants)
|
|
|
|
Character encoding auto-detection in Python. As\
|
|
|
|
• Big5, GB2312, EUC-TW, HZ-GB-2312, ISO-2022-CN (Traditional and Simplified
|
|
|
|
smart as your browser. Open source.
|
|
|
|
Chinese)
|
|
|
|
|
|
|
|
• EUC-JP, SHIFT_JIS, CP932, ISO-2022-JP (Japanese)
|
|
|
|
|
|
|
|
• EUC-KR, ISO-2022-KR, Johab (Korean)
|
|
|
|
|
|
|
|
• KOI8-R, MacCyrillic, IBM855, IBM866, ISO-8859-5, windows-1251 (Cyrillic)
|
|
|
|
|
|
|
|
• ISO-8859-5, windows-1251 (Bulgarian)
|
|
|
|
|
|
|
|
• ISO-8859-1, windows-1252 (Western European languages)
|
|
|
|
|
|
|
|
• ISO-8859-7, windows-1253 (Greek)
|
|
|
|
|
|
|
|
• ISO-8859-8, windows-1255 (Visual and Logical Hebrew)
|
|
|
|
|
|
|
|
• TIS-620 (Thai)
|
|
|
|
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
ISO-8859-2 and windows-1250 (Hungarian) probers have been temporarily
|
|
|
|
|
|
|
|
disabled.}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
|
|
|
%{common_description}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python3-chardet
|
|
|
|
%package -n python3-chardet
|
|
|
|
Summary: %{summary}
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-chardet %_description
|
|
|
|
# Removed in F41:
|
|
|
|
|
|
|
|
Obsoletes: python-chardet-doc < 5.2.0-12
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python3-chardet
|
|
|
|
|
|
|
|
%{common_description}
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
|
|
|
%autosetup -p1 -n chardet-%{version}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Remove useless shebangs
|
|
|
|
%prep
|
|
|
|
# https://github.com/chardet/chardet/commit/1e94b33329
|
|
|
|
%autosetup -n chardet-%{version}
|
|
|
|
grep -lr "^#\!/usr/bin/env python" chardet/ | xargs sed -i "1d"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
|
|
|
%generate_buildrequires
|
|
|
|
%pyproject_buildrequires -r
|
|
|
|
%pyproject_buildrequires
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
@ -48,37 +83,134 @@ grep -lr "^#\!/usr/bin/env python" chardet/ | xargs sed -i "1d"
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
%pyproject_install
|
|
|
|
%pyproject_install
|
|
|
|
%pyproject_save_files chardet
|
|
|
|
%pyproject_save_files -l chardet
|
|
|
|
|
|
|
|
install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE2}'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with tests}
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
%pytest -v
|
|
|
|
# We cannot run the upstream tests because they would require data files with
|
|
|
|
%endif
|
|
|
|
# problematic license status.
|
|
|
|
|
|
|
|
%pyproject_check_import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-chardet -f %{pyproject_files}
|
|
|
|
%files -n python3-chardet -f %{pyproject_files}
|
|
|
|
%license LICENSE
|
|
|
|
|
|
|
|
%doc README.rst
|
|
|
|
%doc README.rst
|
|
|
|
%{_bindir}/chardetect
|
|
|
|
%{_bindir}/chardetect
|
|
|
|
|
|
|
|
%{_mandir}/man1/chardetect.1*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
* Mon Feb 21 2022 Tomas Orsava <torsava@redhat.com> - 4.0.0-5
|
|
|
|
* Tue Dec 17 2024 Arkady L. Shane <tigro@msvsphere-os.ru> - 5.2.0-15
|
|
|
|
- Add gating configuration and a simple smoke test
|
|
|
|
- Rebuilt for MSVSphere 10
|
|
|
|
- Related: rhbz#1950291
|
|
|
|
|
|
|
|
|
|
|
|
## START: Generated by rpmautospec
|
|
|
|
|
|
|
|
* Mon Jul 29 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 5.2.0-14
|
|
|
|
|
|
|
|
- Fix source archive, which was xz-compressed despite the .zst extension
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-13
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jul 05 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 5.2.0-12
|
|
|
|
|
|
|
|
- F41+: Stop building PDF documentation; drop -doc subpackage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 5.2.0-10
|
|
|
|
|
|
|
|
- Rebuilt for Python 3.13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 5.2.0-9
|
|
|
|
|
|
|
|
- Bootstrap for Python 3.13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Apr 05 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 5.2.0-8
|
|
|
|
|
|
|
|
- Use zstd instead of xz for filtered source archive compression
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Apr 05 2024 Benjamin A. Beasley <code@musicinmybrain.net> - 5.2.0-7
|
|
|
|
|
|
|
|
- Make the filtered source archive more reproducible
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-4
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.0-3
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sun Dec 17 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 5.2.0-2
|
|
|
|
|
|
|
|
- Assert that %%pyproject_files contains a license file
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Aug 02 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 5.2.0-1
|
|
|
|
|
|
|
|
- Update to 5.2.0 (close RHBZ#2228250)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-8
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jul 11 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 5.1.0-7
|
|
|
|
|
|
|
|
- When PDF docs are disabled, omit the -doc subpackage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jul 07 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 5.1.0-6
|
|
|
|
|
|
|
|
- Use new (rpm 4.17.1+) bcond style
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Feb 08 2022 Tomas Orsava <torsava@redhat.com> - 4.0.0-4
|
|
|
|
* Fri Jun 16 2023 Python Maint <python-maint@redhat.com> - 5.1.0-5
|
|
|
|
- Add automatically generated Obsoletes tag with the python39- prefix
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
for smoother upgrade from RHEL8
|
|
|
|
|
|
|
|
- Related: rhbz#1990421
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 4.0.0-3
|
|
|
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 5.1.0-4
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
- Bootstrap for Python 3.12
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 4.0.0-2
|
|
|
|
* Fri Mar 17 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 5.1.0-3
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
- Don’t assume %%_smp_mflags is -j%%_smp_build_ncpus
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.1.0-2
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Dec 01 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 5.1.0-1
|
|
|
|
|
|
|
|
- Update to 5.1.0 (close RHBZ#2150154)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Oct 21 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 5.0.0-3
|
|
|
|
|
|
|
|
- Update License to SPDX
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-2
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jun 25 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 5.0.0-1
|
|
|
|
|
|
|
|
- Update to 5.0.0 (close RHBZ#2101067)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jun 25 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 4.0.0-19
|
|
|
|
|
|
|
|
- Fix get_source_script
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jun 25 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 4.0.0-18
|
|
|
|
|
|
|
|
- Drop test data with problematic license status
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jun 25 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 4.0.0-17
|
|
|
|
|
|
|
|
- BR python3dist(hypothesis) to enable more tests
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jun 25 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 4.0.0-16
|
|
|
|
|
|
|
|
- Package Sphinx-generated PDF in a -doc subpackage
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jun 25 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 4.0.0-15
|
|
|
|
|
|
|
|
- Drop explicit pyproject-rpm-macros BR
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jun 25 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 4.0.0-14
|
|
|
|
|
|
|
|
- Update summary and description from upstream
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jun 25 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 4.0.0-13
|
|
|
|
|
|
|
|
- Add a man page for the chardetect command
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jun 25 2022 Benjamin A. Beasley <code@musicinmybrain.net> - 4.0.0-12
|
|
|
|
|
|
|
|
- Correct License from LGPLv2 to LGPLv2+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.0.0-7
|
|
|
|
|
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.0.0-6
|
|
|
|
|
|
|
|
- Bootstrap for Python 3.11
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-5
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.0-4
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 4.0.0-3
|
|
|
|
|
|
|
|
- Rebuilt for Python 3.10
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 4.0.0-2
|
|
|
|
|
|
|
|
- Bootstrap for Python 3.10
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Feb 05 2021 Miro Hrončok <mhroncok@redhat.com> - 4.0.0-1
|
|
|
|
* Fri Feb 05 2021 Miro Hrončok <mhroncok@redhat.com> - 4.0.0-1
|
|
|
|
- Update to 4.0.0
|
|
|
|
- Update to 4.0.0
|
|
|
@ -205,3 +337,5 @@ grep -lr "^#\!/usr/bin/env python" chardet/ | xargs sed -i "1d"
|
|
|
|
* Mon Aug 04 2008 Kushal Das <kushal@fedoraproject.org> 1.0.1-1
|
|
|
|
* Mon Aug 04 2008 Kushal Das <kushal@fedoraproject.org> 1.0.1-1
|
|
|
|
- Initial release
|
|
|
|
- Initial release
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## END: Generated by rpmautospec
|
|
|
|