3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
8 Summary: Internationalized Domain Names in Applications (IDNA) for Python 2
9 Summary(pl.UTF-8): IDNA (Internationalized Domain Names in Applications) dla Pythona 2
10 Name: python-%{module}
14 Group: Libraries/Python
15 #Source0Download: https://github.com/kjd/idna/releases
16 Source0: https://github.com/kjd/idna/archive/v%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5: f10fd48347b6f3c8e4dcbf16d6761f3f
18 URL: https://github.com/kjd/idna
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules >= 1:2.7
23 BuildRequires: python-setuptools
26 BuildRequires: python3-modules >= 1:3.4
27 BuildRequires: python3-setuptools
29 Requires: python-modules >= 1:2.7
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 A library to support the Internationalised Domain Names in
35 Applications (IDNA) protocol as specified in RFC 5891. This version of
36 the protocol is often referred to as IDNA2008 and can produce
37 different results from the earlier standard from 2003.
39 The library is also intended to act as a suitable drop-in replacement
40 for the encodings.idna module that comes with the Python standard
41 library but currently only supports the older 2003 specification.
43 %description -l pl.UTF-8
44 Biblioteka obsługująca protokół IDNA (International Domain Names in
45 Applications - międzynarodowe nazwy domen w aplikacjach) według
46 specyfikacji RFC 5891. Ta wersja protokołu jest często nazywana
47 IDNA2008 i może dawać inne wyniki, niż wcześniejszy standard z 2003
50 Ta biblioteka ma służyć także jako zamiennik modułu encodings.idna
51 dostarczanego z biblioteką standardową Pythona, ale obecnie
52 obsługująca tylko starszą specyfikację z 2003.
54 %package -n python3-%{module}
55 Summary: Internationalized Domain Names in Applications (IDNA) for Python 3
56 Summary(pl.UTF-8): IDNA (Internationalized Domain Names in Applications) dla Pythona 3
57 Group: Libraries/Python
58 Requires: python3-modules >= 1:3.4
60 %description -n python3-%{module}
61 A library to support the Internationalised Domain Names in
62 Applications (IDNA) protocol as specified in RFC 5891. This version of
63 the protocol is often referred to as IDNA2008 and can produce
64 different results from the earlier standard from 2003.
66 The library is also intended to act as a suitable drop-in replacement
67 for the encodings.idna module that comes with the Python standard
68 library but currently only supports the older 2003 specification.
70 %description -n python3-%{module} -l pl.UTF-8
71 Biblioteka obsługująca protokół IDNA (International Domain Names in
72 Applications - międzynarodowe nazwy domen w aplikacjach) według
73 specyfikacji RFC 5891. Ta wersja protokołu jest często nazywana
74 IDNA2008 i może dawać inne wyniki, niż wcześniejszy standard z 2003
77 Ta biblioteka ma służyć także jako zamiennik modułu encodings.idna
78 dostarczanego z biblioteką standardową Pythona, ale obecnie
79 obsługująca tylko starszą specyfikację z 2003.
82 %setup -q -n %{module}-%{version}
86 %py_build %{?with_tests:test}
90 %py3_build %{?with_tests:test}
94 rm -rf $RPM_BUILD_ROOT
107 rm -rf $RPM_BUILD_ROOT
111 %defattr(644,root,root,755)
112 %doc HISTORY.rst LICENSE.rst README.rst
113 %{py_sitescriptdir}/%{module}
114 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
118 %files -n python3-%{module}
119 %defattr(644,root,root,755)
120 %doc HISTORY.rst LICENSE.rst README.rst
121 %{py3_sitescriptdir}/%{module}
122 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info