]>
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 | |
5 | %bcond_with tests # test target [not all dependencies are currently available in PLD] | |
06232684 JB |
6 | |
7 | Summary: Crypthography library for Python 2 | |
8 | Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 2 | |
9 | Name: python-cryptography | |
3e42f450 | 10 | Version: 2.4.2 |
606dca6b | 11 | Release: 1 |
d6e7edf5 | 12 | License: Apache v2.0 or BSD |
06232684 | 13 | Group: Libraries/Python |
29d4b67b | 14 | #Source0Download: https://pypi.org/simple/cryptography/ |
7df50b22 | 15 | Source0: https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz |
3e42f450 | 16 | # Source0-md5: 26bad6a40a373e2ad43dfa13dc4b162b |
06232684 | 17 | URL: https://cryptography.io/ |
7df50b22 | 18 | BuildRequires: openssl-devel >= 1.0.1 |
d331861d | 19 | BuildRequires: rpm-pythonprov >= 5.4.15-48 |
049a803f | 20 | BuildRequires: rpmbuild(macros) >= 1.714 |
06232684 | 21 | %if %{with python2} |
606dca6b | 22 | BuildRequires: python-cffi >= 1.7 |
29d4b67b | 23 | BuildRequires: python-devel >= 1:2.7 |
b2fc4ef3 | 24 | BuildRequires: python-enum34 |
29d4b67b JB |
25 | BuildRequires: python-pytz |
26 | BuildRequires: python-setuptools >= 18.5 | |
06232684 | 27 | BuildRequires: python-six >= 1.4.1 |
049a803f | 28 | %if %{with tests} |
29d4b67b | 29 | BuildRequires: python-asn1crypto >= 0.21.0 |
049a803f JB |
30 | BuildRequires: python-cryptography_vectors |
31 | %if "%{py_ver}" >= "2.7" | |
32 | BuildRequires: python-hypothesis >= 1.11.4 | |
33 | %endif | |
29d4b67b | 34 | BuildRequires: python-idna >= 2.1 |
049a803f JB |
35 | BuildRequires: python-ipaddress |
36 | BuildRequires: python-iso8601 | |
37 | BuildRequires: python-pretend | |
29d4b67b | 38 | BuildRequires: python-pytest >= 3.6.0 |
049a803f | 39 | %endif |
06232684 JB |
40 | %endif |
41 | %if %{with python3} | |
606dca6b | 42 | BuildRequires: python3-cffi >= 1.7 |
d331861d | 43 | BuildRequires: python3-devel >= 1:3.4 |
29d4b67b | 44 | BuildRequires: python3-setuptools >= 18.5 |
06232684 | 45 | BuildRequires: python3-six >= 1.4.1 |
049a803f | 46 | %if %{with tests} |
29d4b67b | 47 | BuildRequires: python3-asn1crypto >= 0.21.0 |
049a803f JB |
48 | BuildRequires: python3-cryptography_vectors |
49 | BuildRequires: python3-hypothesis >= 1.11.4 | |
29d4b67b | 50 | BuildRequires: python3-idna >= 2.1 |
049a803f JB |
51 | BuildRequires: python3-iso8601 |
52 | BuildRequires: python3-pretend | |
29d4b67b | 53 | BuildRequires: python3-pytest >= 3.6.0 |
049a803f | 54 | %endif |
06232684 | 55 | %endif |
7df50b22 | 56 | Requires: openssl >= 1.0.1 |
606dca6b | 57 | Requires: python-cffi >= 1.7 |
06232684 JB |
58 | Requires: python-six >= 1.4.1 |
59 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
60 | ||
61 | %description | |
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 | |
65 | 3.2+, and PyPy. | |
66 | ||
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. | |
70 | ||
71 | This package contains Python 2 modules. | |
72 | ||
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. | |
78 | ||
79 | cryptography zawiera zarówno funkcje wysokopoziomowe, jak i | |
80 | niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych, | |
226a2f8d | 81 | takich jak szyfry symetryczne, skróty wiadomości czy funkcje |
06232684 JB |
82 | wyprowadzające klucze. |
83 | ||
84 | Ten pakiet zawiera moduły Pythona 2. | |
85 | ||
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 | |
7df50b22 | 90 | Requires: openssl >= 1.0.1 |
606dca6b | 91 | Requires: python3-cffi >= 1.7 |
06232684 JB |
92 | Requires: python3-six >= 1.4.1 |
93 | ||
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 | |
98 | 3.2+, and PyPy. | |
99 | ||
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. | |
103 | ||
104 | This package contains Python 3 modules. | |
105 | ||
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. | |
111 | ||
112 | cryptography zawiera zarówno funkcje wysokopoziomowe, jak i | |
113 | niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych, | |
226a2f8d | 114 | takich jak szyfry symetryczne, skróty wiadomości czy funkcje |
06232684 JB |
115 | wyprowadzające klucze. |
116 | ||
117 | Ten pakiet zawiera moduły Pythona 3. | |
118 | ||
119 | %prep | |
120 | %setup -q -n cryptography-%{version} | |
121 | ||
122 | %build | |
123 | export CFLAGS="%{rpmcflags}" | |
124 | ||
125 | %if %{with python2} | |
049a803f | 126 | %py_build %{?with_tests:test} |
06232684 JB |
127 | %endif |
128 | ||
129 | %if %{with python2} | |
049a803f | 130 | %py3_build %{?with_tests:test} |
06232684 JB |
131 | %endif |
132 | ||
133 | %install | |
134 | rm -rf $RPM_BUILD_ROOT | |
135 | ||
136 | %if %{with python2} | |
6d1f8f74 | 137 | %py_install |
06232684 JB |
138 | |
139 | %py_postclean | |
140 | %endif | |
141 | ||
142 | %if %{with python3} | |
6d1f8f74 | 143 | %py3_install |
06232684 JB |
144 | %endif |
145 | ||
146 | %clean | |
147 | rm -rf $RPM_BUILD_ROOT | |
148 | ||
149 | %if %{with python2} | |
150 | %files | |
151 | %defattr(644,root,root,755) | |
049a803f | 152 | %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD |
06232684 | 153 | %dir %{py_sitedir}/cryptography |
06232684 JB |
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] | |
06232684 JB |
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] | |
d198b5a4 | 163 | %attr(755,root,root) %{py_sitedir}/cryptography/hazmat/bindings/_*.so |
06232684 JB |
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] | |
f7d88309 AM |
174 | %dir %{py_sitedir}/cryptography/hazmat/primitives/twofactor |
175 | %{py_sitedir}/cryptography/hazmat/primitives/twofactor/*.py[co] | |
d198b5a4 AM |
176 | %dir %{py_sitedir}/cryptography/x509 |
177 | %{py_sitedir}/cryptography/x509/*.py[co] | |
06232684 JB |
178 | %{py_sitedir}/cryptography-%{version}-py*.egg-info |
179 | %endif | |
180 | ||
181 | %if %{with python3} | |
182 | %files -n python3-cryptography | |
183 | %defattr(644,root,root,755) | |
049a803f | 184 | %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD |
06232684 | 185 | %dir %{py3_sitedir}/cryptography |
06232684 JB |
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__ | |
06232684 JB |
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__ | |
d198b5a4 | 200 | %attr(755,root,root) %{py3_sitedir}/cryptography/hazmat/bindings/_*.so |
06232684 JB |
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__ | |
f7d88309 AM |
216 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor |
217 | %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py | |
218 | %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__ | |
d198b5a4 AM |
219 | %dir %{py3_sitedir}/cryptography/x509 |
220 | %{py3_sitedir}/cryptography/x509/*.py | |
221 | %{py3_sitedir}/cryptography/x509/__pycache__ | |
06232684 JB |
222 | %{py3_sitedir}/cryptography-%{version}-py*.egg-info |
223 | %endif |