]>
Commit | Line | Data |
---|---|---|
06232684 JB |
1 | # |
2 | # Conditional build: | |
049a803f JB |
3 | %bcond_without python2 # CPython 2.x module |
4 | %bcond_without python3 # CPython 3.x module | |
f63b1331 | 5 | %bcond_without doc # Sphinx documentation |
049a803f | 6 | %bcond_with tests # test target [not all dependencies are currently available in PLD] |
06232684 JB |
7 | |
8 | Summary: Crypthography library for Python 2 | |
9 | Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 2 | |
10 | Name: python-cryptography | |
f63b1331 | 11 | Version: 2.7 |
606dca6b | 12 | Release: 1 |
d6e7edf5 | 13 | License: Apache v2.0 or BSD |
06232684 | 14 | Group: Libraries/Python |
29d4b67b | 15 | #Source0Download: https://pypi.org/simple/cryptography/ |
7df50b22 | 16 | Source0: https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz |
f63b1331 | 17 | # Source0-md5: 7dfe1035cae43569e571318f000462a4 |
06232684 | 18 | URL: https://cryptography.io/ |
7df50b22 | 19 | BuildRequires: openssl-devel >= 1.0.1 |
d331861d | 20 | BuildRequires: rpm-pythonprov >= 5.4.15-48 |
049a803f | 21 | BuildRequires: rpmbuild(macros) >= 1.714 |
06232684 | 22 | %if %{with python2} |
f63b1331 | 23 | BuildRequires: python-cffi >= 1.8 |
29d4b67b | 24 | BuildRequires: python-devel >= 1:2.7 |
b2fc4ef3 | 25 | BuildRequires: python-enum34 |
29d4b67b JB |
26 | BuildRequires: python-pytz |
27 | BuildRequires: python-setuptools >= 18.5 | |
06232684 | 28 | BuildRequires: python-six >= 1.4.1 |
049a803f | 29 | %if %{with tests} |
29d4b67b | 30 | BuildRequires: python-asn1crypto >= 0.21.0 |
049a803f JB |
31 | BuildRequires: python-cryptography_vectors |
32 | %if "%{py_ver}" >= "2.7" | |
33 | BuildRequires: python-hypothesis >= 1.11.4 | |
34 | %endif | |
29d4b67b | 35 | BuildRequires: python-idna >= 2.1 |
049a803f JB |
36 | BuildRequires: python-ipaddress |
37 | BuildRequires: python-iso8601 | |
38 | BuildRequires: python-pretend | |
29d4b67b | 39 | BuildRequires: python-pytest >= 3.6.0 |
f63b1331 | 40 | BuildRequires: python-pytz |
049a803f | 41 | %endif |
06232684 JB |
42 | %endif |
43 | %if %{with python3} | |
f63b1331 | 44 | BuildRequires: python3-cffi >= 1.8 |
d331861d | 45 | BuildRequires: python3-devel >= 1:3.4 |
29d4b67b | 46 | BuildRequires: python3-setuptools >= 18.5 |
06232684 | 47 | BuildRequires: python3-six >= 1.4.1 |
049a803f | 48 | %if %{with tests} |
29d4b67b | 49 | BuildRequires: python3-asn1crypto >= 0.21.0 |
049a803f JB |
50 | BuildRequires: python3-cryptography_vectors |
51 | BuildRequires: python3-hypothesis >= 1.11.4 | |
29d4b67b | 52 | BuildRequires: python3-idna >= 2.1 |
049a803f JB |
53 | BuildRequires: python3-iso8601 |
54 | BuildRequires: python3-pretend | |
29d4b67b | 55 | BuildRequires: python3-pytest >= 3.6.0 |
f63b1331 JB |
56 | BuildRequires: python3-pytz |
57 | %endif | |
049a803f | 58 | %endif |
f63b1331 JB |
59 | %if %{with doc} |
60 | BuildRequires: python3-sphinx_rtd_theme | |
61 | BuildRequires: sphinx-pdg-3 >= 1.6.5 | |
06232684 | 62 | %endif |
7df50b22 | 63 | Requires: openssl >= 1.0.1 |
06232684 JB |
64 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
65 | ||
66 | %description | |
67 | cryptography is a package designed to expose cryptographic recipes and | |
68 | primitives to Python developers. Our goal is for it to be your | |
69 | "cryptographic standard library". It supports Python 2.6-2.7, Python | |
70 | 3.2+, and PyPy. | |
71 | ||
72 | cryptography includes both high level recipes, and low level | |
73 | interfaces to common cryptographic algorithms such as symmetric | |
74 | ciphers, message digests and key derivation functions. | |
75 | ||
76 | This package contains Python 2 modules. | |
77 | ||
78 | %description -l pl.UTF-8 | |
79 | cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i | |
80 | obiektów kryptograficznych programistom Pythona. Celem jest | |
81 | dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje | |
82 | Pythona 2.6-2.7, Pythona 3.2+ oraz PyPy. | |
83 | ||
84 | cryptography zawiera zarówno funkcje wysokopoziomowe, jak i | |
85 | niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych, | |
226a2f8d | 86 | takich jak szyfry symetryczne, skróty wiadomości czy funkcje |
06232684 JB |
87 | wyprowadzające klucze. |
88 | ||
89 | Ten pakiet zawiera moduły Pythona 2. | |
90 | ||
91 | %package -n python3-cryptography | |
92 | Summary: Crypthography library for Python 3 | |
93 | Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 3 | |
94 | Group: Libraries/Python | |
7df50b22 | 95 | Requires: openssl >= 1.0.1 |
06232684 JB |
96 | |
97 | %description -n python3-cryptography | |
98 | cryptography is a package designed to expose cryptographic recipes and | |
99 | primitives to Python developers. Our goal is for it to be your | |
100 | "cryptographic standard library". It supports Python 2.6-2.7, Python | |
101 | 3.2+, and PyPy. | |
102 | ||
103 | cryptography includes both high level recipes, and low level | |
104 | interfaces to common cryptographic algorithms such as symmetric | |
105 | ciphers, message digests and key derivation functions. | |
106 | ||
107 | This package contains Python 3 modules. | |
108 | ||
109 | %description -n python3-cryptography -l pl.UTF-8 | |
110 | cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i | |
111 | obiektów kryptograficznych programistom Pythona. Celem jest | |
112 | dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje | |
113 | Pythona 2.6-2.7, Pythona 3.2+ oraz PyPy. | |
114 | ||
115 | cryptography zawiera zarówno funkcje wysokopoziomowe, jak i | |
116 | niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych, | |
226a2f8d | 117 | takich jak szyfry symetryczne, skróty wiadomości czy funkcje |
06232684 JB |
118 | wyprowadzające klucze. |
119 | ||
120 | Ten pakiet zawiera moduły Pythona 3. | |
121 | ||
f63b1331 JB |
122 | %package apidocs |
123 | Summary: API documentation for cryptography module | |
124 | Summary(pl.UTF-8): Dokumentacja API modułu cryptography | |
125 | Group: Documentation | |
126 | ||
127 | %description apidocs | |
128 | API documentation for cryptography module. | |
129 | ||
130 | %description apidocs -l pl.UTF-8 | |
131 | Dokumentacja API modułu cryptography. | |
132 | ||
06232684 JB |
133 | %prep |
134 | %setup -q -n cryptography-%{version} | |
135 | ||
136 | %build | |
137 | export CFLAGS="%{rpmcflags}" | |
138 | ||
139 | %if %{with python2} | |
049a803f | 140 | %py_build %{?with_tests:test} |
06232684 JB |
141 | %endif |
142 | ||
143 | %if %{with python2} | |
049a803f | 144 | %py3_build %{?with_tests:test} |
06232684 JB |
145 | %endif |
146 | ||
f63b1331 JB |
147 | %if %{with doc} |
148 | %{__make} -C docs html \ | |
149 | SPHINXBUILD=sphinx-build-3 | |
150 | %endif | |
151 | ||
06232684 JB |
152 | %install |
153 | rm -rf $RPM_BUILD_ROOT | |
154 | ||
155 | %if %{with python2} | |
6d1f8f74 | 156 | %py_install |
06232684 JB |
157 | |
158 | %py_postclean | |
159 | %endif | |
160 | ||
161 | %if %{with python3} | |
6d1f8f74 | 162 | %py3_install |
06232684 JB |
163 | %endif |
164 | ||
165 | %clean | |
166 | rm -rf $RPM_BUILD_ROOT | |
167 | ||
168 | %if %{with python2} | |
169 | %files | |
170 | %defattr(644,root,root,755) | |
049a803f | 171 | %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD |
06232684 | 172 | %dir %{py_sitedir}/cryptography |
06232684 JB |
173 | %{py_sitedir}/cryptography/*.py[co] |
174 | %dir %{py_sitedir}/cryptography/hazmat | |
175 | %{py_sitedir}/cryptography/hazmat/*.py[co] | |
176 | %dir %{py_sitedir}/cryptography/hazmat/backends | |
177 | %{py_sitedir}/cryptography/hazmat/backends/*.py[co] | |
06232684 JB |
178 | %dir %{py_sitedir}/cryptography/hazmat/backends/openssl |
179 | %{py_sitedir}/cryptography/hazmat/backends/openssl/*.py[co] | |
180 | %dir %{py_sitedir}/cryptography/hazmat/bindings | |
181 | %{py_sitedir}/cryptography/hazmat/bindings/*.py[co] | |
d198b5a4 | 182 | %attr(755,root,root) %{py_sitedir}/cryptography/hazmat/bindings/_*.so |
06232684 JB |
183 | %dir %{py_sitedir}/cryptography/hazmat/bindings/openssl |
184 | %{py_sitedir}/cryptography/hazmat/bindings/openssl/*.py[co] | |
185 | %dir %{py_sitedir}/cryptography/hazmat/primitives | |
186 | %{py_sitedir}/cryptography/hazmat/primitives/*.py[co] | |
187 | %dir %{py_sitedir}/cryptography/hazmat/primitives/asymmetric | |
188 | %{py_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py[co] | |
189 | %dir %{py_sitedir}/cryptography/hazmat/primitives/ciphers | |
190 | %{py_sitedir}/cryptography/hazmat/primitives/ciphers/*.py[co] | |
191 | %dir %{py_sitedir}/cryptography/hazmat/primitives/kdf | |
192 | %{py_sitedir}/cryptography/hazmat/primitives/kdf/*.py[co] | |
f63b1331 JB |
193 | %dir %{py_sitedir}/cryptography/hazmat/primitives/serialization |
194 | %{py_sitedir}/cryptography/hazmat/primitives/serialization/*.py[co] | |
f7d88309 AM |
195 | %dir %{py_sitedir}/cryptography/hazmat/primitives/twofactor |
196 | %{py_sitedir}/cryptography/hazmat/primitives/twofactor/*.py[co] | |
d198b5a4 AM |
197 | %dir %{py_sitedir}/cryptography/x509 |
198 | %{py_sitedir}/cryptography/x509/*.py[co] | |
06232684 JB |
199 | %{py_sitedir}/cryptography-%{version}-py*.egg-info |
200 | %endif | |
201 | ||
202 | %if %{with python3} | |
203 | %files -n python3-cryptography | |
204 | %defattr(644,root,root,755) | |
049a803f | 205 | %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD |
06232684 | 206 | %dir %{py3_sitedir}/cryptography |
06232684 JB |
207 | %{py3_sitedir}/cryptography/*.py |
208 | %{py3_sitedir}/cryptography/__pycache__ | |
209 | %dir %{py3_sitedir}/cryptography/hazmat | |
210 | %{py3_sitedir}/cryptography/hazmat/*.py | |
211 | %{py3_sitedir}/cryptography/hazmat/__pycache__ | |
212 | %dir %{py3_sitedir}/cryptography/hazmat/backends | |
213 | %{py3_sitedir}/cryptography/hazmat/backends/*.py | |
214 | %{py3_sitedir}/cryptography/hazmat/backends/__pycache__ | |
06232684 JB |
215 | %dir %{py3_sitedir}/cryptography/hazmat/backends/openssl |
216 | %{py3_sitedir}/cryptography/hazmat/backends/openssl/*.py | |
217 | %{py3_sitedir}/cryptography/hazmat/backends/openssl/__pycache__ | |
218 | %dir %{py3_sitedir}/cryptography/hazmat/bindings | |
219 | %{py3_sitedir}/cryptography/hazmat/bindings/*.py | |
220 | %{py3_sitedir}/cryptography/hazmat/bindings/__pycache__ | |
d198b5a4 | 221 | %attr(755,root,root) %{py3_sitedir}/cryptography/hazmat/bindings/_*.so |
06232684 JB |
222 | %dir %{py3_sitedir}/cryptography/hazmat/bindings/openssl |
223 | %{py3_sitedir}/cryptography/hazmat/bindings/openssl/*.py | |
224 | %{py3_sitedir}/cryptography/hazmat/bindings/openssl/__pycache__ | |
225 | %dir %{py3_sitedir}/cryptography/hazmat/primitives | |
226 | %{py3_sitedir}/cryptography/hazmat/primitives/*.py | |
227 | %{py3_sitedir}/cryptography/hazmat/primitives/__pycache__ | |
228 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric | |
229 | %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py | |
230 | %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/__pycache__ | |
231 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/ciphers | |
232 | %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/*.py | |
233 | %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/__pycache__ | |
234 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/kdf | |
235 | %{py3_sitedir}/cryptography/hazmat/primitives/kdf/*.py | |
236 | %{py3_sitedir}/cryptography/hazmat/primitives/kdf/__pycache__ | |
f63b1331 JB |
237 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/serialization |
238 | %{py3_sitedir}/cryptography/hazmat/primitives/serialization/*.py | |
239 | %{py3_sitedir}/cryptography/hazmat/primitives/serialization/__pycache__ | |
f7d88309 AM |
240 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor |
241 | %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py | |
242 | %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__ | |
d198b5a4 AM |
243 | %dir %{py3_sitedir}/cryptography/x509 |
244 | %{py3_sitedir}/cryptography/x509/*.py | |
245 | %{py3_sitedir}/cryptography/x509/__pycache__ | |
06232684 JB |
246 | %{py3_sitedir}/cryptography-%{version}-py*.egg-info |
247 | %endif | |
f63b1331 JB |
248 | |
249 | %if %{with doc} | |
250 | %files apidocs | |
251 | %defattr(644,root,root,755) | |
252 | %doc docs/_build/html/{_downloads,_modules,_static,development,hazmat,x509,*.html,*.js} | |
253 | %endif |