]> git.pld-linux.org Git - packages/python3-pyOpenSSL.git/blob - python-pyOpenSSL.spec
- updated to 21.0.0, versioned Obsoletes
[packages/python3-pyOpenSSL.git] / python-pyOpenSSL.spec
1 # TODO: check why disabled tests fail and reenable them
2 #
3 # Conditional build:
4 %bcond_without  tests   # unit tests
5 %bcond_without  python2 # CPython 2.x module
6 %bcond_without  python3 # CPython 3.x module
7 %bcond_without  doc     # HTML documentation (sphinx-based)
8
9 %define         module  pyOpenSSL
10 Summary:        Python 2 interface to the OpenSSL library
11 Summary(pl.UTF-8):      Interfejs Pythona 2 do biblioteki OpenSSL
12 Name:           python-%{module}
13 # keep 21.x here for python2 support
14 Version:        21.0.0
15 Release:        1
16 License:        Apache v2.0
17 Group:          Libraries/Python
18 #Source0Download: https://pypi.org/simple/pyopenssl/
19 Source0:        https://files.pythonhosted.org/packages/source/p/pyOpenSSL/%{module}-%{version}.tar.gz
20 # Source0-md5:  2ec707d15b4e92f5ca5e46e5aab2f4ca
21 URL:            https://github.com/pyca/pyopenssl
22 %if %(locale -a | grep -q '^C\.utf8$'; echo $?)
23 BuildRequires:  glibc-localedb-all
24 %endif
25 BuildRequires:  rpm-pythonprov
26 BuildRequires:  rpmbuild(macros) >= 1.710
27 %if %{with python2}
28 BuildRequires:  python-devel >= 1:2.7
29 BuildRequires:  python-setuptools
30 %if %{with tests}
31 BuildRequires:  python-cryptography >= 2.8
32 BuildRequires:  python-flaky
33 BuildRequires:  python-pretend
34 BuildRequires:  python-pytest >= 3.0.1
35 BuildRequires:  python-six >= 1.5.2
36 %endif
37 %endif
38 %if %{with python3}
39 BuildRequires:  python3-devel >= 1:3.4
40 BuildRequires:  python3-setuptools
41 %if %{with tests}
42 BuildRequires:  python3-cryptography >= 2.8
43 BuildRequires:  python3-flaky
44 BuildRequires:  python3-pretend
45 BuildRequires:  python3-pytest >= 3.0.1
46 BuildRequires:  python3-six >= 1.5.2
47 %endif
48 %endif
49 %if %{with doc}
50 BuildRequires:  python3-sphinx_rtd_theme
51 BuildRequires:  sphinx-pdg-3
52 %endif
53 Obsoletes:      python-OpenSSL < 0.6
54 Obsoletes:      python-pyOpenSSL-examples < 19.1.0
55 BuildArch:      noarch
56 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
57
58 %description
59 High-level wrapper around a subset of the OpenSSL library, includes:
60  - SSL.Connection objects, wrapping the methods of Python's portable
61    sockets
62  - Callbacks written in Python
63  - Extensive error-handling mechanism, mirroring OpenSSL's error codes
64 ...and much more.
65
66 This package contains Python 2 modules.
67
68 %description -l pl.UTF-8
69 Wysokopoziomowe obudowanie podzbioru biblioteki OpenSSL, zawierające:
70  - obiekty SSL.Connection, obudowujący metody przenośnych gniazd
71    Pythona
72  - wywołania zwrotne napisane w Pythonie
73  - obszerny mechanizm obsługi błędów odzwierciedlający kody błędów
74    OpenSSL-a
75 ...i wiele więcej.
76
77 Ten pakiet zawiera moduły Pythona 2.
78
79 %package -n python3-pyOpenSSL
80 Summary:        Python 3 interface to the OpenSSL library
81 Summary(pl.UTF-8):      Interfejs Pythona 3 do biblioteki OpenSSL
82 Group:          Libraries/Python
83
84 %description -n python3-pyOpenSSL
85 High-level wrapper around a subset of the OpenSSL library, includes:
86  - SSL.Connection objects, wrapping the methods of Python's portable
87    sockets
88  - Callbacks written in Python
89  - Extensive error-handling mechanism, mirroring OpenSSL's error codes
90 ...and much more.
91
92 This package contains Python 3 modules.
93
94 %description -n python3-pyOpenSSL -l pl.UTF-8
95 Wysokopoziomowe obudowanie podzbioru biblioteki OpenSSL, zawierające:
96  - obiekty SSL.Connection, obudowujący metody przenośnych gniazd
97    Pythona
98  - wywołania zwrotne napisane w Pythonie
99  - obszerny mechanizm obsługi błędów odzwierciedlający kody błędów
100    OpenSSL-a
101 ...i wiele więcej.
102
103 Ten pakiet zawiera moduły Pythona 3.
104
105 %package apidocs
106 Summary:        %{module} API documentation
107 Summary(pl.UTF-8):      Dokumentacja API modułu %{module}
108 Group:          Documentation
109 Obsoletes:      python-pyOpenSSL-doc < 0.6-3
110 Obsoletes:      python-pyOpenSSL-doc-html < 0.6-3
111
112 %description apidocs
113 API documentation for %{module}.
114
115 %description apidocs -l pl.UTF-8
116 Dokumentacja API modułu %{module}.
117
118 %prep
119 %setup -q -n %{module}-%{version}
120
121 %build
122 %if %{with python2}
123 LC_ALL=C.UTF-8 \
124 %py_build
125
126 %if %{with tests}
127 PYTHONPATH=$(pwd)/build-2/lib \
128 %{__python} -m pytest -v tests  -k 'not test_verify_with_time and not test_alpn_call_failure'
129 %endif
130 %endif
131
132 %if %{with python3}
133 LC_ALL=C.UTF-8 \
134 %py3_build
135
136 %if %{with tests}
137 PYTHONPATH=$(pwd)/build-3/lib \
138 %{__python3} -m pytest -v tests  -k 'not test_verify_with_time not test_alpn_call_failure'
139 %endif
140 %endif
141
142 %if %{with doc}
143 %{__make} -C doc html \
144         SPHINXBUILD=sphinx-build-3
145 %endif
146
147 %install
148 rm -rf $RPM_BUILD_ROOT
149
150 %if %{with python2}
151 %py_install
152
153 %py_postclean
154 %endif
155
156 %if %{with python3}
157 %py3_install
158 %endif
159
160 %clean
161 rm -rf $RPM_BUILD_ROOT
162
163 %if %{with python2}
164 %files
165 %defattr(644,root,root,755)
166 %doc CHANGELOG.rst README.rst
167 %dir %{py_sitescriptdir}/OpenSSL
168 %{py_sitescriptdir}/OpenSSL/*.py[co]
169 %{py_sitescriptdir}/pyOpenSSL-%{version}-py*.egg-info
170 %endif
171
172 %if %{with python3}
173 %files -n python3-pyOpenSSL
174 %defattr(644,root,root,755)
175 %doc CHANGELOG.rst README.rst
176 %dir %{py3_sitescriptdir}/OpenSSL
177 %{py3_sitescriptdir}/OpenSSL/*.py
178 %{py3_sitescriptdir}/OpenSSL/__pycache__
179 %{py3_sitescriptdir}/pyOpenSSL-%{version}-py*.egg-info
180 %endif
181
182 %if %{with doc}
183 %files apidocs
184 %defattr(644,root,root,755)
185 %doc doc/_build/html/{*.html,_static,api}
186 %endif
This page took 0.262199 seconds and 3 git commands to generate.