3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_without doc # Sphinx documentation
6 %bcond_without tests # unit test
8 Summary: Crypthography library for Python 2
9 Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 2
10 Name: python-cryptography
13 License: Apache v2.0 or BSD
14 Group: Libraries/Python
15 #Source0Download: https://pypi.org/simple/cryptography/
16 Source0: https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
17 # Source0-md5: 6faa1a7125c500c0e1586ad342ba3b30
18 #Source1Download: https://pypi.org/simple/cryptography_vectors/
19 Source1: https://files.pythonhosted.org/packages/source/c/cryptography-vectors/cryptography_vectors-%{version}.tar.gz
20 # Source1-md5: 2a23fd073fc1f95a697ee96fc991e419
21 URL: https://cryptography.io/
22 BuildRequires: openssl-devel >= 1.1.0
23 BuildRequires: rpm-pythonprov >= 5.4.15-48
24 BuildRequires: rpmbuild(macros) >= 1.714
26 BuildRequires: python-cffi >= 1.12
27 BuildRequires: python-devel >= 1:2.7
28 BuildRequires: python-enum34
29 BuildRequires: python-pytz
30 BuildRequires: python-setuptools >= 18.5
31 BuildRequires: python-six >= 1.4.1
33 %if "%{py_ver}" >= "2.7"
34 BuildRequires: python-hypothesis >= 1.11.4
36 BuildRequires: python-ipaddress
37 BuildRequires: python-iso8601
38 BuildRequires: python-pretend
39 BuildRequires: python-pytest >= 3.6.0
40 BuildRequires: python-pytz
44 BuildRequires: python3-cffi >= 1.12
45 BuildRequires: python3-devel >= 1:3.6
46 BuildRequires: python3-setuptools >= 18.5
47 BuildRequires: python3-six >= 1.4.1
49 BuildRequires: python3-hypothesis >= 1.11.4
50 BuildRequires: python3-iso8601
51 BuildRequires: python3-pretend
52 BuildRequires: python3-pytest >= 3.6.0
53 BuildRequires: python3-pytz
57 BuildRequires: python3-sphinx_rtd_theme
58 BuildRequires: sphinx-pdg-3 >= 1.6.5
60 Requires: openssl >= 1.1.0
61 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
64 cryptography is a package designed to expose cryptographic recipes and
65 primitives to Python developers. Our goal is for it to be your
66 "cryptographic standard library". It supports Python 2.7, Python 3.4+,
69 cryptography includes both high level recipes, and low level
70 interfaces to common cryptographic algorithms such as symmetric
71 ciphers, message digests and key derivation functions.
73 This package contains Python 2 modules.
75 %description -l pl.UTF-8
76 cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i
77 obiektów kryptograficznych programistom Pythona. Celem jest
78 dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje
79 Pythona 2.7, Pythona 3.4+ oraz PyPy.
81 cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
82 niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
83 takich jak szyfry symetryczne, skróty wiadomości czy funkcje
84 wyprowadzające klucze.
86 Ten pakiet zawiera moduły Pythona 2.
88 %package -n python3-cryptography
89 Summary: Crypthography library for Python 3
90 Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 3
91 Group: Libraries/Python
92 Requires: openssl >= 1.1.0
94 %description -n python3-cryptography
95 cryptography is a package designed to expose cryptographic recipes and
96 primitives to Python developers. Our goal is for it to be your
97 "cryptographic standard library". It supports Python 2.7, Python 3.4+,
100 cryptography includes both high level recipes, and low level
101 interfaces to common cryptographic algorithms such as symmetric
102 ciphers, message digests and key derivation functions.
104 This package contains Python 3 modules.
106 %description -n python3-cryptography -l pl.UTF-8
107 cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i
108 obiektów kryptograficznych programistom Pythona. Celem jest
109 dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje
110 Pythona 2.7, Pythona 3.4+ oraz PyPy.
112 cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
113 niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
114 takich jak szyfry symetryczne, skróty wiadomości czy funkcje
115 wyprowadzające klucze.
117 Ten pakiet zawiera moduły Pythona 3.
120 Summary: API documentation for cryptography module
121 Summary(pl.UTF-8): Dokumentacja API modułu cryptography
126 API documentation for cryptography module.
128 %description apidocs -l pl.UTF-8
129 Dokumentacja API modułu cryptography.
132 %setup -q -n cryptography-%{version} %{?with_tests:-a1}
135 %{__mv} cryptography_vectors-%{version}/cryptography_vectors .
139 export CFLAGS="%{rpmcflags}"
145 PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
146 %{__python} -m pytest tests
154 PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
155 %{__python3} -m pytest tests
160 %{__make} -C docs html \
161 SPHINXBUILD=sphinx-build-3
165 rm -rf $RPM_BUILD_ROOT
178 rm -rf $RPM_BUILD_ROOT
182 %defattr(644,root,root,755)
183 %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD
184 %dir %{py_sitedir}/cryptography
185 %{py_sitedir}/cryptography/*.py[co]
186 %dir %{py_sitedir}/cryptography/hazmat
187 %{py_sitedir}/cryptography/hazmat/*.py[co]
188 %dir %{py_sitedir}/cryptography/hazmat/backends
189 %{py_sitedir}/cryptography/hazmat/backends/*.py[co]
190 %dir %{py_sitedir}/cryptography/hazmat/backends/openssl
191 %{py_sitedir}/cryptography/hazmat/backends/openssl/*.py[co]
192 %dir %{py_sitedir}/cryptography/hazmat/bindings
193 %{py_sitedir}/cryptography/hazmat/bindings/*.py[co]
194 %attr(755,root,root) %{py_sitedir}/cryptography/hazmat/bindings/_*.so
195 %dir %{py_sitedir}/cryptography/hazmat/bindings/openssl
196 %{py_sitedir}/cryptography/hazmat/bindings/openssl/*.py[co]
197 %dir %{py_sitedir}/cryptography/hazmat/primitives
198 %{py_sitedir}/cryptography/hazmat/primitives/*.py[co]
199 %dir %{py_sitedir}/cryptography/hazmat/primitives/asymmetric
200 %{py_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py[co]
201 %dir %{py_sitedir}/cryptography/hazmat/primitives/ciphers
202 %{py_sitedir}/cryptography/hazmat/primitives/ciphers/*.py[co]
203 %dir %{py_sitedir}/cryptography/hazmat/primitives/kdf
204 %{py_sitedir}/cryptography/hazmat/primitives/kdf/*.py[co]
205 %dir %{py_sitedir}/cryptography/hazmat/primitives/serialization
206 %{py_sitedir}/cryptography/hazmat/primitives/serialization/*.py[co]
207 %dir %{py_sitedir}/cryptography/hazmat/primitives/twofactor
208 %{py_sitedir}/cryptography/hazmat/primitives/twofactor/*.py[co]
209 %dir %{py_sitedir}/cryptography/x509
210 %{py_sitedir}/cryptography/x509/*.py[co]
211 %{py_sitedir}/cryptography-%{version}-py*.egg-info
215 %files -n python3-cryptography
216 %defattr(644,root,root,755)
217 %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD
218 %dir %{py3_sitedir}/cryptography
219 %{py3_sitedir}/cryptography/*.py
220 %{py3_sitedir}/cryptography/__pycache__
221 %dir %{py3_sitedir}/cryptography/hazmat
222 %{py3_sitedir}/cryptography/hazmat/*.py
223 %{py3_sitedir}/cryptography/hazmat/__pycache__
224 %dir %{py3_sitedir}/cryptography/hazmat/backends
225 %{py3_sitedir}/cryptography/hazmat/backends/*.py
226 %{py3_sitedir}/cryptography/hazmat/backends/__pycache__
227 %dir %{py3_sitedir}/cryptography/hazmat/backends/openssl
228 %{py3_sitedir}/cryptography/hazmat/backends/openssl/*.py
229 %{py3_sitedir}/cryptography/hazmat/backends/openssl/__pycache__
230 %dir %{py3_sitedir}/cryptography/hazmat/bindings
231 %{py3_sitedir}/cryptography/hazmat/bindings/*.py
232 %{py3_sitedir}/cryptography/hazmat/bindings/__pycache__
233 %attr(755,root,root) %{py3_sitedir}/cryptography/hazmat/bindings/_*.so
234 %dir %{py3_sitedir}/cryptography/hazmat/bindings/openssl
235 %{py3_sitedir}/cryptography/hazmat/bindings/openssl/*.py
236 %{py3_sitedir}/cryptography/hazmat/bindings/openssl/__pycache__
237 %dir %{py3_sitedir}/cryptography/hazmat/primitives
238 %{py3_sitedir}/cryptography/hazmat/primitives/*.py
239 %{py3_sitedir}/cryptography/hazmat/primitives/__pycache__
240 %dir %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric
241 %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py
242 %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/__pycache__
243 %dir %{py3_sitedir}/cryptography/hazmat/primitives/ciphers
244 %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/*.py
245 %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/__pycache__
246 %dir %{py3_sitedir}/cryptography/hazmat/primitives/kdf
247 %{py3_sitedir}/cryptography/hazmat/primitives/kdf/*.py
248 %{py3_sitedir}/cryptography/hazmat/primitives/kdf/__pycache__
249 %dir %{py3_sitedir}/cryptography/hazmat/primitives/serialization
250 %{py3_sitedir}/cryptography/hazmat/primitives/serialization/*.py
251 %{py3_sitedir}/cryptography/hazmat/primitives/serialization/__pycache__
252 %dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor
253 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py
254 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__
255 %dir %{py3_sitedir}/cryptography/x509
256 %{py3_sitedir}/cryptography/x509/*.py
257 %{py3_sitedir}/cryptography/x509/__pycache__
258 %{py3_sitedir}/cryptography-%{version}-py*.egg-info
263 %defattr(644,root,root,755)
264 %doc docs/_build/html/{_downloads,_static,development,hazmat,x509,*.html,*.js}