mirror of
https://github.com/openRuyi-Project/openRuyi.git
synced 2026-05-13 18:33:44 +00:00
51 lines
1.7 KiB
RPMSpec
51 lines
1.7 KiB
RPMSpec
# SPDX-FileCopyrightText: (C) 2025 Institute of Software, Chinese Academy of Sciences (ISCAS)
|
||
# SPDX-FileCopyrightText: (C) 2025 openRuyi Project Contributors
|
||
# SPDX-FileContributor: Zheng Junjie <zhengjunjie@iscas.ac.cn>
|
||
#
|
||
# SPDX-License-Identifier: MulanPSL-2.0
|
||
|
||
%global srcname webencodings
|
||
|
||
Name: python-%{srcname}
|
||
Version: 0.5.1
|
||
Release: %autorelease
|
||
Summary: Character encoding aliases for legacy web content
|
||
License: BSD-3-Clause
|
||
URL: https://github.com/SimonSapin/python-webencodings
|
||
#!RemoteAsset
|
||
Source0: https://files.pythonhosted.org/packages/source/w/%{srcname}/%{srcname}-%{version}.tar.gz
|
||
BuildArch: noarch
|
||
BuildSystem: pyproject
|
||
|
||
BuildOption(install): %{srcname} +auto
|
||
|
||
BuildRequires: pyproject-rpm-macros
|
||
BuildRequires: pkgconfig(python3)
|
||
|
||
Provides: python3-%{srcname}
|
||
%python_provide python3-%{srcname}
|
||
|
||
%description
|
||
In order to be compatible with legacy web content when interpreting
|
||
something like @code{Content-Type: text/html; charset=latin1}, tools need
|
||
to use a particular set of aliases for encoding labels as well as some
|
||
overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
|
||
the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
|
||
or @code{UTF-16} BOM takes precedence over any other encoding declaration.
|
||
The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
|
||
defines all such details so that implementations do not have to
|
||
reverse-engineer each other.
|
||
|
||
This module implements the Encoding standard and has encoding labels and
|
||
BOM detection, but the actual implementation for encoders and decoders
|
||
is Python’s.
|
||
|
||
%generate_buildrequires
|
||
%pyproject_buildrequires
|
||
|
||
%files -f %{pyproject_files}
|
||
%doc README*
|
||
|
||
%changelog
|
||
%{?autochangelog}
|