]> git.pld-linux.org Git - packages/python-webencodings.git/blob - python-webencodings.spec
rebuild with tests and docs
[packages/python-webencodings.git] / python-webencodings.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 Summary:        Character encoding aliases for legacy web content
8 Summary(pl.UTF-8):      Aliasy kodowania znaków dla zastanych treści WWW
9 Name:           python-webencodings
10 Version:        0.5.1
11 Release:        7
12 License:        BSD
13 Group:          Libraries/Python
14 #Source0Download: https://pypi.org/simple/webencodings/
15 Source0:        https://files.pythonhosted.org/packages/source/w/webencodings/webencodings-%{version}.tar.gz
16 # Source0-md5:  32f6e261d52e57bf7e1c4d41546d15b8
17 URL:            https://github.com/SimonSapin/python-webencodings
18 %if %{with python2}
19 BuildRequires:  python-modules >= 1:2.6
20 %{?with_tests:BuildRequires:    python-nose}
21 BuildRequires:  python-setuptools
22 %endif
23 %if %{with python3}
24 BuildRequires:  python3-modules >= 1:3.3
25 %{?with_tests:BuildRequires:    python3-nose}
26 BuildRequires:  python3-setuptools
27 %endif
28 BuildRequires:  rpm-pythonprov
29 BuildRequires:  rpmbuild(macros) >= 1.714
30 Requires:       python-modules >= 1:2.6
31 BuildArch:      noarch
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 This is a Python 2 implementation of the WHATWG Encoding standard.
36
37 In order to be compatible with legacy web content when interpreting
38 something like "Content-Type: text/html; charset=latin1", tools need
39 to use a particular set of aliases for encoding labels as well as some
40 overriding rules. For example, US-ASCII and iso-8859-1 on the web are
41 usually aliases for windows-1252, and an UTF-8 or UTF-16 BOM takes
42 precedence over any other encoding declaration. The Encoding standard
43 defines all such details so that implementations do not have to
44 reverse-engineer each other.
45
46 This module has encoding labels and BOM detection, but the actual
47 implementation for encoders and decoders is Python's.
48
49 %description -l pl.UTF-8
50 Ten moduł to implementacja standardu WHATWG Encoding w Pythonie 2.
51
52 Aby być zgodnym z zastaną treścią WWW przy interpretowaniu nagłówków
53 typu "Content-Type: text/html; charset=latin1", narzędzia muszą użyć
54 pewnego zbioru aliasów oraz reguł nadpisujących. Na przykład, US-ASCII
55 i iso-8859-1 w sieci zwykle są aliasami dla windows-1252, a BOM UTF-8
56 i UTF-16 ma priorytet ponad innymi deklaracjami kodowania. Standard
57 Encoding definiuje wszystkie takie szczegóły, aby implementacje nie
58 musiały ich wynajdywać samemu.
59
60 Ten moduł zawiera etykiety kodowań oraz wykrywanie BOM; sama
61 implementacja kodowania i dekodowania pochodzi z Pythona.
62
63 %package -n python3-webencodings
64 Summary:        Character encoding aliases for legacy web content
65 Summary(pl.UTF-8):      Aliasy kodowania znaków dla zastanych treści WWW
66 Group:          Libraries/Python
67 Requires:       python3-modules >= 1:3.3
68
69 %description -n python3-webencodings
70 This is a Python 3 implementation of the WHATWG Encoding standard.
71
72 In order to be compatible with legacy web content when interpreting
73 something like Content-Type: text/html; charset=latin1, tools need to
74 use a particular set of aliases for encoding labels as well as some
75 overriding rules. For example, US-ASCII and iso-8859-1 on the web are
76 usually aliases for windows-1252, and an UTF-8 or UTF-16 BOM takes
77 precedence over any other encoding declaration. The Encoding standard
78 defines all such details so that implementations do not have to
79 reverse-engineer each other.
80
81 This module has encoding labels and BOM detection, but the actual
82 implementation for encoders and decoders is Python's.
83
84 %description -n python3-webencodings -l pl.UTF-8
85 Ten moduł to implementacja standardu WHATWG Encoding w Pythonie 3.
86
87 Aby być zgodnym z zastaną treścią WWW przy interpretowaniu nagłówków
88 typu "Content-Type: text/html; charset=latin1", narzędzia muszą użyć
89 pewnego zbioru aliasów oraz reguł nadpisujących. Na przykład, US-ASCII
90 i iso-8859-1 w sieci zwykle są aliasami dla windows-1252, a BOM UTF-8
91 i UTF-16 ma priorytet ponad innymi deklaracjami kodowania. Standard
92 Encoding definiuje wszystkie takie szczegóły, aby implementacje nie
93 musiały ich wynajdywać samemu.
94
95 Ten moduł zawiera etykiety kodowań oraz wykrywanie BOM; sama
96 implementacja 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
115 rm -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
128 rm -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.324538 seconds and 3 git commands to generate.