Compare commits

...
Sign in to create a new pull request.

18 commits

Author SHA1 Message Date
Fedora Release Engineering
1d5c4beab0 Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-16 18:38:27 +00:00
Python Maint
fb8682759f Rebuilt for Python 3.15 2026-06-03 20:39:04 +02:00
Benjamin A. Beasley
05d5e93e94 Use various long options 2026-05-21 10:58:57 +01:00
Benjamin A. Beasley
c9b6649086 Use long pyproject options 2026-05-11 06:57:08 +01:00
Benjamin A. Beasley
d50d1271ef Package from 6.0.0.post1 git tag now that we can
This is the exact same commit that we packaged as 6.0.0.post1 before.
2026-05-11 06:56:40 +01:00
Benjamin A. Beasley
797f8bf3dd Update to 6.0.0.post1 2026-03-05 09:29:52 +00:00
Benjamin A. Beasley
e14a10bbbf Update to 6.0.0
- Switch from PyPI sdist to GitHub archive as basis for filtered source
  archive, since the PyPI sdist now contains pre-generated HTML docs
  and is harder to audit
2026-02-23 06:30:26 +00:00
Benjamin A. Beasley
ddb915ea31 Correct License to LGPL-2.1-or-later 2026-02-22 08:53:36 +00:00
Benjamin A. Beasley
7564045502 Improve the man page: complete SYNOPSIS, better formatting 2026-02-22 07:22:14 +00:00
Benjamin A. Beasley
90d02706d9 Document how long to keep the -doc upgrade path
[skip changelog]
2026-02-22 07:22:14 +00:00
Fedora Release Engineering
1e1a66b65a Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-17 06:42:42 +00:00
Python Maint
17642dfc17 Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 12:58:27 +02:00
Python Maint
2683a63371 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 13:54:11 +02:00
Fedora Release Engineering
74eeca0894 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 07:09:54 +00:00
Python Maint
1b67fcd42b Rebuilt for Python 3.14 2025-06-02 20:12:11 +02:00
Benjamin A. Beasley
f3975537e1 F41+: Use the provisional pyproject declarative buildsystem 2025-05-03 08:03:22 -04:00
Benjamin A. Beasley
09b953d845 Update .rpmlintrc file for current rpmlint 2025-05-03 08:01:53 -04:00
Fedora Release Engineering
353a16c6dc Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-18 12:50:21 +00:00
6 changed files with 55 additions and 47 deletions

3
.gitignore vendored
View file

@ -5,3 +5,6 @@
/chardet-5.1.0-filtered.tar.xz
/chardet-5.2.0-filtered.tar.xz
/chardet-5.2.0-filtered.tar.zst
/chardet-6.0.0-filtered.tar.zst
/chardet-2fa72d84fdb9cb926eb1e7e40230a33b1dd81bb8-filtered.tar.zst
/chardet-6.0.0.post1-filtered.tar.zst

View file

@ -1,10 +1,13 @@
.TH CHARDETECT "1" "June 2022" "" "User Commands"
.TH CHARDETECT "1" "February 2026" "" "User Commands"
.SH NAME
.B chardetect
\(en takes one or more file paths and reports their detected encodings
.SH SYNOPSIS
.B chardetect
.RB [ \-h ]
.RB [ \-\-minimal ]
.RB [ \-l ]
.RB [ \-e\ \fIENCODING_ERA ]
.RB [ \-\-version ]
.RI [ input \ ...]
.SH OPTIONS
@ -17,13 +20,26 @@ File whose encoding we would like to determine.
.SS "OPTIONAL ARGUMENTS"
.TP
.B \-h\fR, \fB\-\-help
show a help message and exit
Show a help message and exit.
.TP
.B \-\-minimal
Print only the encoding to standard output
Print only the encoding to standard output.
.TP
.B \-l\fR, \fB\-\-legacy
Rename legacy encodings to more modern ones.
.TP
.B \-e\fR, \fB\-\-encoding\-era\ \fIENCODING_ERA
Which era of encodings to consider
(default:
.BR MODERN_WEB ).
Choices:
.BR MODERN_WEB ,
.BR LEGACY_ISO ,
.BR LEGACY_MAC ,
.BR LEGACY_REGIONAL ,
.BR DOS ,
.BR MAINFRAME ,
.BR ALL
.TP
.B \-\-version
show program\(cqs version number and exit
Show program\(cqs version number and exit.

View file

@ -18,7 +18,7 @@ TMPDIR="$(mktemp -d)"
trap "rm -rf '${TMPDIR}'" INT TERM EXIT
cd "${TMPDIR}"
URL="$(rpm -E "%{pypi_source chardet ${VERSION}}")"
URL="https://github.com/chardet/chardet/archive/${VERSION}/chardet-${VERSION}.tar.gz"
echo "--> Downloading: ${URL}" 1>&2
curl -L -O "${URL}"

View file

@ -1,8 +1,4 @@
# Not a real spelling error:
addFilter(r" spelling-error \('([Pp]rober)s?',")
# This Source cannot be a URL because we must filter out certain files.
addFilter(r" invalid-url Source[0-9]+: chardet-.*-filtered\.tar\.zst")
# Bogus; it is a perfectly fine zstandard file.
addFilter(r" inconsistent-file-extension chardet-.*-filtered\.tar\.zst$")
# The -doc subpackage was removed without an equivalent replacement.
addFilter(r" obsolete-not-provided python-chardet-doc$")

View file

@ -1,49 +1,52 @@
#global commit xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Name: python-chardet
Version: 5.2.0
Version: 6.0.0.post1
Release: %autorelease
Summary: Python character encoding detector
# The entire source, after tests/ are filtered, is LGPL-2.0-or-later. See the
# The entire source, after tests/ are filtered, is LGPL-2.1-or-later. See the
# comment above Source0 for more details on tests/.
License: LGPL-2.0-or-later
License: LGPL-2.1-or-later
URL: https://github.com/chardet/chardet
# A filtered source tarball, obtained by (see Source1):
#
# ./get_source %%{version}
# or
# ./get_source %%{commit}
#
# 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
%if %{undefined commit}
Source0: chardet-%{version}-filtered.tar.zst
%else
Source0: chardet-%{commit}-filtered.tar.zst
%endif
Source1: get_source
# Hand-written for Fedora in groff_man(7) format based on --help output
Source2: chardetect.1
BuildArch: noarch
BuildSystem: pyproject
BuildOption(install): --assert-license chardet
BuildRequires: python3-devel
BuildArch: noarch
%global common_description %{expand:
Chardet: The Universal Character Encoding Detector
Detects:
Detects over 70 character encodings including:
• ASCII, UTF-8, UTF-16 (2 variants), UTF-32 (4 variants)
• Big5, GB2312, EUC-TW, HZ-GB-2312, ISO-2022-CN (Traditional and Simplified
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)
ISO-8859-2 and windows-1250 (Hungarian) probers have been temporarily
disabled.}
• All major Unicode encodings (UTF-8, UTF-16, UTF-32)
• Windows code pages (Windows-1250 through Windows-1258)
• ISO-8859 family (ISO-8859-1 through ISO-8859-16)
• CJK encodings (Big5, GB18030, EUC-JP, EUC-KR, Shift-JIS, and more)
• Cyrillic encodings (KOI8-R, KOI8-U, IBM866, and more)
• Mac encodings (MacRoman, MacCyrillic, and more)
• DOS/OEM code pages (CP437, CP850, CP866, and more)
• EBCDIC variants (CP037, CP500)}
%description
%{common_description}
@ -52,35 +55,25 @@ disabled.}
%package -n python3-chardet
Summary: %{summary}
# Removed in F41:
Obsoletes: python-chardet-doc < 5.2.0-12
%description -n python3-chardet
%{common_description}
%prep
%autosetup -n chardet-%{version}
%generate_buildrequires -p
export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
%generate_buildrequires
%pyproject_buildrequires
%build -p
export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}'
%build
%pyproject_wheel
%install -a
install -D --preserve-timestamps --mode=0644 \
--target='%{buildroot}%{_mandir}/man1' '%{SOURCE2}'
%install
%pyproject_install
%pyproject_save_files -l chardet
install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{SOURCE2}'
%check
# We cannot run the upstream tests because they would require data files with
# problematic license status.
%pyproject_check_import
%files -n python3-chardet -f %{pyproject_files}

View file

@ -1 +1 @@
SHA512 (chardet-5.2.0-filtered.tar.zst) = 410b2d62c54781f9b848ee78c659d4607bbb7f94f6117d7fa7cd5f82a50dfaf10d6e4c6dfaefa9b9a721b846c167aa12eae029debbaa66b0d830875c8ce5749c
SHA512 (chardet-6.0.0.post1-filtered.tar.zst) = 6d40f1f19006555d8e6f7f0bea4fa1b2af7350c376d8a767a44266e1a7a501cde0fcac5408ee2ef808b626b1261dc9af774ddfe783cdc18617d2767d09cecfa6