3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 Summary: Crypthography library for Python 2
7 Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 2
8 Name: python-cryptography
11 License: Apache v2.0 or BSD
12 Group: Libraries/Python
13 Source0: https://pypi.python.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
14 # Source0-md5: 7d33499e851300c194cbb0396de72462
15 URL: https://cryptography.io/
16 BuildRequires: openssl-devel >= 0.9.8
18 BuildRequires: python-cffi >= 0.8
19 BuildRequires: python-devel >= 1:2.6
20 BuildRequires: python-six >= 1.4.1
23 BuildRequires: python3-cffi >= 0.8
24 BuildRequires: python3-devel >= 1:3.2
25 BuildRequires: python3-six >= 1.4.1
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.612
29 Requires: python-cffi >= 0.8
30 Requires: python-six >= 1.4.1
31 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 cryptography is a package designed to expose cryptographic recipes and
35 primitives to Python developers. Our goal is for it to be your
36 "cryptographic standard library". It supports Python 2.6-2.7, Python
39 cryptography includes both high level recipes, and low level
40 interfaces to common cryptographic algorithms such as symmetric
41 ciphers, message digests and key derivation functions.
43 This package contains Python 2 modules.
45 %description -l pl.UTF-8
46 cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i
47 obiektów kryptograficznych programistom Pythona. Celem jest
48 dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje
49 Pythona 2.6-2.7, Pythona 3.2+ oraz PyPy.
51 cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
52 niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
53 takich jak szyfry symetryczne, skróty wiadomości czy funkcje
54 wyprowadzające klucze.
56 Ten pakiet zawiera moduły Pythona 2.
58 %package -n python3-cryptography
59 Summary: Crypthography library for Python 3
60 Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 3
61 Group: Libraries/Python
62 Requires: python3-cffi >= 0.8
63 Requires: python3-six >= 1.4.1
65 %description -n python3-cryptography
66 cryptography is a package designed to expose cryptographic recipes and
67 primitives to Python developers. Our goal is for it to be your
68 "cryptographic standard library". It supports Python 2.6-2.7, Python
71 cryptography includes both high level recipes, and low level
72 interfaces to common cryptographic algorithms such as symmetric
73 ciphers, message digests and key derivation functions.
75 This package contains Python 3 modules.
77 %description -n python3-cryptography -l pl.UTF-8
78 cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i
79 obiektów kryptograficznych programistom Pythona. Celem jest
80 dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje
81 Pythona 2.6-2.7, Pythona 3.2+ oraz PyPy.
83 cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
84 niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
85 takich jak szyfry symetryczne, skróty wiadomości czy funkcje
86 wyprowadzające klucze.
88 Ten pakiet zawiera moduły Pythona 3.
91 %setup -q -n cryptography-%{version}
94 export CFLAGS="%{rpmcflags}"
97 %{__python} setup.py build \
102 %{__python3} setup.py build \
107 rm -rf $RPM_BUILD_ROOT
110 %{__python} setup.py \
111 build --build-base build-2 \
112 install --skip-build \
114 --root=$RPM_BUILD_ROOT
117 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/cryptography/hazmat/bindings/__pycache__/*.c
118 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/cryptography/hazmat/primitives/src/*.[ch]
122 %{__python3} setup.py \
123 build --build-base build-3 \
124 install --skip-build \
126 --root=$RPM_BUILD_ROOT
128 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/cryptography/hazmat/primitives/src/*.[ch]
132 rm -rf $RPM_BUILD_ROOT
136 %defattr(644,root,root,755)
137 %doc AUTHORS.rst README.rst LICENSE.APACHE LICENSE.BSD
138 %dir %{py_sitedir}/cryptography
139 %attr(755,root,root) %{py_sitedir}/cryptography/_*_cffi_*.so
140 %{py_sitedir}/cryptography/*.py[co]
141 %dir %{py_sitedir}/cryptography/hazmat
142 %{py_sitedir}/cryptography/hazmat/*.py[co]
143 %dir %{py_sitedir}/cryptography/hazmat/backends
144 %{py_sitedir}/cryptography/hazmat/backends/*.py[co]
145 %dir %{py_sitedir}/cryptography/hazmat/backends/commoncrypto
146 %{py_sitedir}/cryptography/hazmat/backends/commoncrypto/*.py[co]
147 %dir %{py_sitedir}/cryptography/hazmat/backends/openssl
148 %{py_sitedir}/cryptography/hazmat/backends/openssl/*.py[co]
149 %dir %{py_sitedir}/cryptography/hazmat/bindings
150 %{py_sitedir}/cryptography/hazmat/bindings/*.py[co]
151 %dir %{py_sitedir}/cryptography/hazmat/bindings/commoncrypto
152 %{py_sitedir}/cryptography/hazmat/bindings/commoncrypto/*.py[co]
153 %dir %{py_sitedir}/cryptography/hazmat/bindings/openssl
154 %{py_sitedir}/cryptography/hazmat/bindings/openssl/*.py[co]
155 %dir %{py_sitedir}/cryptography/hazmat/primitives
156 %{py_sitedir}/cryptography/hazmat/primitives/*.py[co]
157 %dir %{py_sitedir}/cryptography/hazmat/primitives/asymmetric
158 %{py_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py[co]
159 %dir %{py_sitedir}/cryptography/hazmat/primitives/ciphers
160 %{py_sitedir}/cryptography/hazmat/primitives/ciphers/*.py[co]
161 %dir %{py_sitedir}/cryptography/hazmat/primitives/kdf
162 %{py_sitedir}/cryptography/hazmat/primitives/kdf/*.py[co]
163 %dir %{py_sitedir}/cryptography/hazmat/primitives/twofactor
164 %{py_sitedir}/cryptography/hazmat/primitives/twofactor/*.py[co]
165 %{py_sitedir}/cryptography-%{version}-py*.egg-info
169 %files -n python3-cryptography
170 %defattr(644,root,root,755)
171 %doc AUTHORS.rst README.rst LICENSE.APACHE LICENSE.BSD
172 %dir %{py3_sitedir}/cryptography
173 %attr(755,root,root) %{py3_sitedir}/cryptography/_*_cffi_*.so
174 %{py3_sitedir}/cryptography/*.py
175 %{py3_sitedir}/cryptography/__pycache__
176 %dir %{py3_sitedir}/cryptography/hazmat
177 %{py3_sitedir}/cryptography/hazmat/*.py
178 %{py3_sitedir}/cryptography/hazmat/__pycache__
179 %dir %{py3_sitedir}/cryptography/hazmat/backends
180 %{py3_sitedir}/cryptography/hazmat/backends/*.py
181 %{py3_sitedir}/cryptography/hazmat/backends/__pycache__
182 %dir %{py3_sitedir}/cryptography/hazmat/backends/commoncrypto
183 %{py3_sitedir}/cryptography/hazmat/backends/commoncrypto/*.py
184 %{py3_sitedir}/cryptography/hazmat/backends/commoncrypto/__pycache__
185 %dir %{py3_sitedir}/cryptography/hazmat/backends/openssl
186 %{py3_sitedir}/cryptography/hazmat/backends/openssl/*.py
187 %{py3_sitedir}/cryptography/hazmat/backends/openssl/__pycache__
188 %dir %{py3_sitedir}/cryptography/hazmat/bindings
189 %{py3_sitedir}/cryptography/hazmat/bindings/*.py
190 %{py3_sitedir}/cryptography/hazmat/bindings/__pycache__
191 %dir %{py3_sitedir}/cryptography/hazmat/bindings/commoncrypto
192 %{py3_sitedir}/cryptography/hazmat/bindings/commoncrypto/*.py
193 %{py3_sitedir}/cryptography/hazmat/bindings/commoncrypto/__pycache__
194 %dir %{py3_sitedir}/cryptography/hazmat/bindings/openssl
195 %{py3_sitedir}/cryptography/hazmat/bindings/openssl/*.py
196 %{py3_sitedir}/cryptography/hazmat/bindings/openssl/__pycache__
197 %dir %{py3_sitedir}/cryptography/hazmat/primitives
198 %{py3_sitedir}/cryptography/hazmat/primitives/*.py
199 %{py3_sitedir}/cryptography/hazmat/primitives/__pycache__
200 %dir %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric
201 %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py
202 %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/__pycache__
203 %dir %{py3_sitedir}/cryptography/hazmat/primitives/ciphers
204 %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/*.py
205 %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/__pycache__
206 %dir %{py3_sitedir}/cryptography/hazmat/primitives/kdf
207 %{py3_sitedir}/cryptography/hazmat/primitives/kdf/*.py
208 %{py3_sitedir}/cryptography/hazmat/primitives/kdf/__pycache__
209 %dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor
210 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py
211 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__
212 %{py3_sitedir}/cryptography-%{version}-py*.egg-info