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