3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
5 %bcond_with tests # test target [not all dependencies are currently available in PLD]
7 Summary: Crypthography library for Python 2
8 Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 2
9 Name: python-cryptography
12 License: Apache v2.0 or BSD
13 Group: Libraries/Python
14 #Source0Download: https://pypi.org/simple/cryptography/
15 Source0: https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
16 # Source0-md5: 26bad6a40a373e2ad43dfa13dc4b162b
17 URL: https://cryptography.io/
18 BuildRequires: openssl-devel >= 1.0.1
19 BuildRequires: rpm-pythonprov >= 5.4.15-48
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-cffi >= 1.7
23 BuildRequires: python-devel >= 1:2.7
24 BuildRequires: python-enum34
25 BuildRequires: python-pytz
26 BuildRequires: python-setuptools >= 18.5
27 BuildRequires: python-six >= 1.4.1
29 BuildRequires: python-asn1crypto >= 0.21.0
30 BuildRequires: python-cryptography_vectors
31 %if "%{py_ver}" >= "2.7"
32 BuildRequires: python-hypothesis >= 1.11.4
34 BuildRequires: python-idna >= 2.1
35 BuildRequires: python-ipaddress
36 BuildRequires: python-iso8601
37 BuildRequires: python-pretend
38 BuildRequires: python-pytest >= 3.6.0
42 BuildRequires: python3-cffi >= 1.7
43 BuildRequires: python3-devel >= 1:3.4
44 BuildRequires: python3-setuptools >= 18.5
45 BuildRequires: python3-six >= 1.4.1
47 BuildRequires: python3-asn1crypto >= 0.21.0
48 BuildRequires: python3-cryptography_vectors
49 BuildRequires: python3-hypothesis >= 1.11.4
50 BuildRequires: python3-idna >= 2.1
51 BuildRequires: python3-iso8601
52 BuildRequires: python3-pretend
53 BuildRequires: python3-pytest >= 3.6.0
56 Requires: openssl >= 1.0.1
57 Requires: python-cffi >= 1.7
58 Requires: python-six >= 1.4.1
59 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
62 cryptography is a package designed to expose cryptographic recipes and
63 primitives to Python developers. Our goal is for it to be your
64 "cryptographic standard library". It supports Python 2.6-2.7, Python
67 cryptography includes both high level recipes, and low level
68 interfaces to common cryptographic algorithms such as symmetric
69 ciphers, message digests and key derivation functions.
71 This package contains Python 2 modules.
73 %description -l pl.UTF-8
74 cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i
75 obiektów kryptograficznych programistom Pythona. Celem jest
76 dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje
77 Pythona 2.6-2.7, Pythona 3.2+ oraz PyPy.
79 cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
80 niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
81 takich jak szyfry symetryczne, skróty wiadomości czy funkcje
82 wyprowadzające klucze.
84 Ten pakiet zawiera moduły Pythona 2.
86 %package -n python3-cryptography
87 Summary: Crypthography library for Python 3
88 Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 3
89 Group: Libraries/Python
90 Requires: openssl >= 1.0.1
91 Requires: python3-cffi >= 1.7
92 Requires: python3-six >= 1.4.1
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.6-2.7, Python
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.6-2.7, Pythona 3.2+ 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 %setup -q -n cryptography-%{version}
123 export CFLAGS="%{rpmcflags}"
126 %py_build %{?with_tests:test}
130 %py3_build %{?with_tests:test}
134 rm -rf $RPM_BUILD_ROOT
147 rm -rf $RPM_BUILD_ROOT
151 %defattr(644,root,root,755)
152 %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD
153 %dir %{py_sitedir}/cryptography
154 %{py_sitedir}/cryptography/*.py[co]
155 %dir %{py_sitedir}/cryptography/hazmat
156 %{py_sitedir}/cryptography/hazmat/*.py[co]
157 %dir %{py_sitedir}/cryptography/hazmat/backends
158 %{py_sitedir}/cryptography/hazmat/backends/*.py[co]
159 %dir %{py_sitedir}/cryptography/hazmat/backends/openssl
160 %{py_sitedir}/cryptography/hazmat/backends/openssl/*.py[co]
161 %dir %{py_sitedir}/cryptography/hazmat/bindings
162 %{py_sitedir}/cryptography/hazmat/bindings/*.py[co]
163 %attr(755,root,root) %{py_sitedir}/cryptography/hazmat/bindings/_*.so
164 %dir %{py_sitedir}/cryptography/hazmat/bindings/openssl
165 %{py_sitedir}/cryptography/hazmat/bindings/openssl/*.py[co]
166 %dir %{py_sitedir}/cryptography/hazmat/primitives
167 %{py_sitedir}/cryptography/hazmat/primitives/*.py[co]
168 %dir %{py_sitedir}/cryptography/hazmat/primitives/asymmetric
169 %{py_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py[co]
170 %dir %{py_sitedir}/cryptography/hazmat/primitives/ciphers
171 %{py_sitedir}/cryptography/hazmat/primitives/ciphers/*.py[co]
172 %dir %{py_sitedir}/cryptography/hazmat/primitives/kdf
173 %{py_sitedir}/cryptography/hazmat/primitives/kdf/*.py[co]
174 %dir %{py_sitedir}/cryptography/hazmat/primitives/twofactor
175 %{py_sitedir}/cryptography/hazmat/primitives/twofactor/*.py[co]
176 %dir %{py_sitedir}/cryptography/x509
177 %{py_sitedir}/cryptography/x509/*.py[co]
178 %{py_sitedir}/cryptography-%{version}-py*.egg-info
182 %files -n python3-cryptography
183 %defattr(644,root,root,755)
184 %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD
185 %dir %{py3_sitedir}/cryptography
186 %{py3_sitedir}/cryptography/*.py
187 %{py3_sitedir}/cryptography/__pycache__
188 %dir %{py3_sitedir}/cryptography/hazmat
189 %{py3_sitedir}/cryptography/hazmat/*.py
190 %{py3_sitedir}/cryptography/hazmat/__pycache__
191 %dir %{py3_sitedir}/cryptography/hazmat/backends
192 %{py3_sitedir}/cryptography/hazmat/backends/*.py
193 %{py3_sitedir}/cryptography/hazmat/backends/__pycache__
194 %dir %{py3_sitedir}/cryptography/hazmat/backends/openssl
195 %{py3_sitedir}/cryptography/hazmat/backends/openssl/*.py
196 %{py3_sitedir}/cryptography/hazmat/backends/openssl/__pycache__
197 %dir %{py3_sitedir}/cryptography/hazmat/bindings
198 %{py3_sitedir}/cryptography/hazmat/bindings/*.py
199 %{py3_sitedir}/cryptography/hazmat/bindings/__pycache__
200 %attr(755,root,root) %{py3_sitedir}/cryptography/hazmat/bindings/_*.so
201 %dir %{py3_sitedir}/cryptography/hazmat/bindings/openssl
202 %{py3_sitedir}/cryptography/hazmat/bindings/openssl/*.py
203 %{py3_sitedir}/cryptography/hazmat/bindings/openssl/__pycache__
204 %dir %{py3_sitedir}/cryptography/hazmat/primitives
205 %{py3_sitedir}/cryptography/hazmat/primitives/*.py
206 %{py3_sitedir}/cryptography/hazmat/primitives/__pycache__
207 %dir %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric
208 %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py
209 %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/__pycache__
210 %dir %{py3_sitedir}/cryptography/hazmat/primitives/ciphers
211 %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/*.py
212 %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/__pycache__
213 %dir %{py3_sitedir}/cryptography/hazmat/primitives/kdf
214 %{py3_sitedir}/cryptography/hazmat/primitives/kdf/*.py
215 %{py3_sitedir}/cryptography/hazmat/primitives/kdf/__pycache__
216 %dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor
217 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py
218 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__
219 %dir %{py3_sitedir}/cryptography/x509
220 %{py3_sitedir}/cryptography/x509/*.py
221 %{py3_sitedir}/cryptography/x509/__pycache__
222 %{py3_sitedir}/cryptography-%{version}-py*.egg-info