Compare commits
18 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d5c4beab0 | ||
|
|
fb8682759f | ||
|
|
05d5e93e94 | ||
|
|
c9b6649086 | ||
|
|
d50d1271ef | ||
|
|
797f8bf3dd | ||
|
|
e14a10bbbf | ||
|
|
ddb915ea31 | ||
|
|
7564045502 | ||
|
|
90d02706d9 | ||
|
|
1e1a66b65a | ||
|
|
17642dfc17 | ||
|
|
2683a63371 | ||
|
|
74eeca0894 | ||
|
|
1b67fcd42b | ||
|
|
f3975537e1 | ||
|
|
09b953d845 | ||
|
|
353a16c6dc |
6 changed files with 47 additions and 41 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
14
chardetect.1
14
chardetect.1
|
|
@ -7,6 +7,7 @@
|
|||
.RB [ \-h ]
|
||||
.RB [ \-\-minimal ]
|
||||
.RB [ \-l ]
|
||||
.RB [ \-e\ \fIENCODING_ERA ]
|
||||
.RB [ \-\-version ]
|
||||
.RI [ input \ ...]
|
||||
.SH OPTIONS
|
||||
|
|
@ -27,5 +28,18 @@ Print only the encoding to standard output.
|
|||
.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.
|
||||
|
|
|
|||
|
|
@ -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}"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +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$")
|
||||
# Update LGPLv2.1 license text and notices for remote-only FSF
|
||||
# https://github.com/chardet/chardet/pull/307
|
||||
addFilter(r" incorrect-fsf-address ")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#global commit xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
Name: python-chardet
|
||||
Version: 5.2.0
|
||||
Version: 6.0.0.post1
|
||||
Release: %autorelease
|
||||
Summary: Python character encoding detector
|
||||
|
||||
|
|
@ -10,40 +12,41 @@ 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}
|
||||
|
|
@ -56,28 +59,21 @@ Summary: %{summary}
|
|||
%{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}
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (chardet-5.2.0-filtered.tar.zst) = 410b2d62c54781f9b848ee78c659d4607bbb7f94f6117d7fa7cd5f82a50dfaf10d6e4c6dfaefa9b9a721b846c167aa12eae029debbaa66b0d830875c8ce5749c
|
||||
SHA512 (chardet-6.0.0.post1-filtered.tar.zst) = 6d40f1f19006555d8e6f7f0bea4fa1b2af7350c376d8a767a44266e1a7a501cde0fcac5408ee2ef808b626b1261dc9af774ddfe783cdc18617d2767d09cecfa6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue