]> git.pld-linux.org Git - packages/python-webencodings.git/blame - python-webencodings.spec
- release 5 (by relup.sh)
[packages/python-webencodings.git] / python-webencodings.spec
CommitLineData
e6e2da41
JB
1#
2# Conditional build:
10861f2f 3%bcond_without tests # unit tests
e6e2da41
JB
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Character encoding aliases for legacy web content
8Summary(pl.UTF-8): Aliasy kodowania znaków dla zastanych treści WWW
9Name: python-webencodings
10Version: 0.5.1
afdf03da 11Release: 5
e6e2da41
JB
12License: BSD
13Group: Libraries/Python
10861f2f 14#Source0Download: https://pypi.org/simple/webencodings/
e6e2da41
JB
15Source0: https://files.pythonhosted.org/packages/source/w/webencodings/webencodings-%{version}.tar.gz
16# Source0-md5: 32f6e261d52e57bf7e1c4d41546d15b8
17URL: https://github.com/SimonSapin/python-webencodings
18%if %{with python2}
19BuildRequires: python-modules >= 1:2.6
20%{?with_tests:BuildRequires: python-nose}
21BuildRequires: python-setuptools
22%endif
23%if %{with python3}
24BuildRequires: python3-modules >= 1:3.3
25%{?with_tests:BuildRequires: python3-nose}
26BuildRequires: python3-setuptools
27%endif
28BuildRequires: rpm-pythonprov
29BuildRequires: rpmbuild(macros) >= 1.714
30Requires: python-modules >= 1:2.6
31BuildArch: noarch
32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34%description
35This is a Python 2 implementation of the WHATWG Encoding standard.
36
37In order to be compatible with legacy web content when interpreting
38something like "Content-Type: text/html; charset=latin1", tools need
39to use a particular set of aliases for encoding labels as well as some
40overriding rules. For example, US-ASCII and iso-8859-1 on the web are
41usually aliases for windows-1252, and an UTF-8 or UTF-16 BOM takes
42precedence over any other encoding declaration. The Encoding standard
43defines all such details so that implementations do not have to
44reverse-engineer each other.
45
46This module has encoding labels and BOM detection, but the actual
47implementation for encoders and decoders is Python's.
48
49%description -l pl.UTF-8
50Ten moduł to implementacja standardu WHATWG Encoding w Pythonie 2.
51
52Aby być zgodnym z zastaną treścią WWW przy interpretowaniu nagłówków
53typu "Content-Type: text/html; charset=latin1", narzędzia muszą użyć
54pewnego zbioru aliasów oraz reguł nadpisujących. Na przykład, US-ASCII
55i iso-8859-1 w sieci zwykle są aliasami dla windows-1252, a BOM UTF-8
56i UTF-16 ma priorytet ponad innymi deklaracjami kodowania. Standard
57Encoding definiuje wszystkie takie szczegóły, aby implementacje nie
58musiały ich wynajdywać samemu.
59
60Ten moduł zawiera etykiety kodowań oraz wykrywanie BOM; sama
61implementacja kodowania i dekodowania pochodzi z Pythona.
62
63%package -n python3-webencodings
64Summary: Character encoding aliases for legacy web content
65Summary(pl.UTF-8): Aliasy kodowania znaków dla zastanych treści WWW
66Group: Libraries/Python
67Requires: python3-modules >= 1:3.3
68
69%description -n python3-webencodings
70This is a Python 3 implementation of the WHATWG Encoding standard.
71
72In order to be compatible with legacy web content when interpreting
73something like Content-Type: text/html; charset=latin1, tools need to
74use a particular set of aliases for encoding labels as well as some
75overriding rules. For example, US-ASCII and iso-8859-1 on the web are
76usually aliases for windows-1252, and an UTF-8 or UTF-16 BOM takes
77precedence over any other encoding declaration. The Encoding standard
78defines all such details so that implementations do not have to
79reverse-engineer each other.
80
81This module has encoding labels and BOM detection, but the actual
82implementation for encoders and decoders is Python's.
83
84%description -n python3-webencodings -l pl.UTF-8
85Ten moduł to implementacja standardu WHATWG Encoding w Pythonie 3.
86
87Aby być zgodnym z zastaną treścią WWW przy interpretowaniu nagłówków
88typu "Content-Type: text/html; charset=latin1", narzędzia muszą użyć
89pewnego zbioru aliasów oraz reguł nadpisujących. Na przykład, US-ASCII
90i iso-8859-1 w sieci zwykle są aliasami dla windows-1252, a BOM UTF-8
91i UTF-16 ma priorytet ponad innymi deklaracjami kodowania. Standard
92Encoding definiuje wszystkie takie szczegóły, aby implementacje nie
93musiały ich wynajdywać samemu.
94
95Ten moduł zawiera etykiety kodowań oraz wykrywanie BOM; sama
96implementacja kodowania i dekodowania pochodzi z Pythona.
97
98%prep
99%setup -q -n webencodings-%{version}
100
101%build
102%if %{with python2}
103%py_build
104
105%{?with_tests:nosetests-%{py_ver}}
106%endif
107
108%if %{with python3}
109%py3_build
110
111%{?with_tests:nosetests-%{py3_ver}}
112%endif
113
114%install
115rm -rf $RPM_BUILD_ROOT
116
117%if %{with python2}
118%py_install
119
120%py_postclean
121%endif
122
123%if %{with python3}
124%py3_install
125%endif
126
127%clean
128rm -rf $RPM_BUILD_ROOT
129
130%if %{with python2}
131%files
132%defattr(644,root,root,755)
133%doc README.rst
134%{py_sitescriptdir}/webencodings
135%{py_sitescriptdir}/webencodings-%{version}-py*.egg-info
136%endif
137
138%if %{with python3}
139%files -n python3-webencodings
140%defattr(644,root,root,755)
141%doc README.rst
142%{py3_sitescriptdir}/webencodings
143%{py3_sitescriptdir}/webencodings-%{version}-py*.egg-info
144%endif
This page took 0.097095 seconds and 4 git commands to generate.