]> git.pld-linux.org Git - packages/python-idna.git/blob - python-idna.spec
- release 3
[packages/python-idna.git] / python-idna.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 %define         module  idna
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}
11 Version:        2.8
12 Release:        3
13 License:        BSD
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
21 %if %{with python2}
22 BuildRequires:  python-modules >= 1:2.7
23 BuildRequires:  python-setuptools
24 %endif
25 %if %{with python3}
26 BuildRequires:  python3-modules >= 1:3.4
27 BuildRequires:  python3-setuptools
28 %endif
29 Requires:       python-modules >= 1:2.7
30 BuildArch:      noarch
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %description
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.
38
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.
42
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
48 roku.
49
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.
53
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
59
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.
65
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.
69
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
75 roku.
76
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.
80
81 %prep
82 %setup -q -n %{module}-%{version}
83
84 %build
85 %if %{with python2}
86 %py_build %{?with_tests:test}
87 %endif
88
89 %if %{with python3}
90 %py3_build %{?with_tests:test}
91 %endif
92
93 %install
94 rm -rf $RPM_BUILD_ROOT
95
96 %if %{with python2}
97 %py_install
98
99 %py_postclean
100 %endif
101
102 %if %{with python3}
103 %py3_install
104 %endif
105
106 %clean
107 rm -rf $RPM_BUILD_ROOT
108
109 %if %{with python2}
110 %files
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
115 %endif
116
117 %if %{with python3}
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
123 %endif
This page took 0.086055 seconds and 3 git commands to generate.