]>
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 | |
606dca6b AM |
10 | Version: 2.4.1 |
11 | Release: 1 | |
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 |
606dca6b | 16 | # Source0-md5: 464f180ff64622760cca7167f97b3ff4 |
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 |
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} | |
606dca6b | 42 | BuildRequires: python3-cffi >= 1.7 |
d331861d | 43 | BuildRequires: python3-devel >= 1:3.4 |
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 |
606dca6b | 58 | Requires: python-cffi >= 1.7 |
06232684 JB |
59 | Requires: python-six >= 1.4.1 |
60 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
61 | ||
62 | %description | |
63 | cryptography is a package designed to expose cryptographic recipes and | |
64 | primitives to Python developers. Our goal is for it to be your | |
65 | "cryptographic standard library". It supports Python 2.6-2.7, Python | |
66 | 3.2+, and PyPy. | |
67 | ||
68 | cryptography includes both high level recipes, and low level | |
69 | interfaces to common cryptographic algorithms such as symmetric | |
70 | ciphers, message digests and key derivation functions. | |
71 | ||
72 | This package contains Python 2 modules. | |
73 | ||
74 | %description -l pl.UTF-8 | |
75 | cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i | |
76 | obiektów kryptograficznych programistom Pythona. Celem jest | |
77 | dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje | |
78 | Pythona 2.6-2.7, Pythona 3.2+ oraz PyPy. | |
79 | ||
80 | cryptography zawiera zarówno funkcje wysokopoziomowe, jak i | |
81 | niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych, | |
226a2f8d | 82 | takich jak szyfry symetryczne, skróty wiadomości czy funkcje |
06232684 JB |
83 | wyprowadzające klucze. |
84 | ||
85 | Ten pakiet zawiera moduły Pythona 2. | |
86 | ||
87 | %package -n python3-cryptography | |
88 | Summary: Crypthography library for Python 3 | |
89 | Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 3 | |
90 | Group: Libraries/Python | |
7df50b22 | 91 | Requires: openssl >= 1.0.1 |
606dca6b | 92 | Requires: python3-cffi >= 1.7 |
06232684 JB |
93 | Requires: python3-six >= 1.4.1 |
94 | ||
95 | %description -n python3-cryptography | |
96 | cryptography is a package designed to expose cryptographic recipes and | |
97 | primitives to Python developers. Our goal is for it to be your | |
98 | "cryptographic standard library". It supports Python 2.6-2.7, Python | |
99 | 3.2+, and PyPy. | |
100 | ||
101 | cryptography includes both high level recipes, and low level | |
102 | interfaces to common cryptographic algorithms such as symmetric | |
103 | ciphers, message digests and key derivation functions. | |
104 | ||
105 | This package contains Python 3 modules. | |
106 | ||
107 | %description -n python3-cryptography -l pl.UTF-8 | |
108 | cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i | |
109 | obiektów kryptograficznych programistom Pythona. Celem jest | |
110 | dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje | |
111 | Pythona 2.6-2.7, Pythona 3.2+ oraz PyPy. | |
112 | ||
113 | cryptography zawiera zarówno funkcje wysokopoziomowe, jak i | |
114 | niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych, | |
226a2f8d | 115 | takich jak szyfry symetryczne, skróty wiadomości czy funkcje |
06232684 JB |
116 | wyprowadzające klucze. |
117 | ||
118 | Ten pakiet zawiera moduły Pythona 3. | |
119 | ||
120 | %prep | |
121 | %setup -q -n cryptography-%{version} | |
122 | ||
123 | %build | |
124 | export CFLAGS="%{rpmcflags}" | |
125 | ||
126 | %if %{with python2} | |
049a803f | 127 | %py_build %{?with_tests:test} |
06232684 JB |
128 | %endif |
129 | ||
130 | %if %{with python2} | |
049a803f | 131 | %py3_build %{?with_tests:test} |
06232684 JB |
132 | %endif |
133 | ||
134 | %install | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | ||
137 | %if %{with python2} | |
6d1f8f74 | 138 | %py_install |
06232684 JB |
139 | |
140 | %py_postclean | |
141 | %endif | |
142 | ||
143 | %if %{with python3} | |
6d1f8f74 | 144 | %py3_install |
06232684 JB |
145 | %endif |
146 | ||
147 | %clean | |
148 | rm -rf $RPM_BUILD_ROOT | |
149 | ||
150 | %if %{with python2} | |
151 | %files | |
152 | %defattr(644,root,root,755) | |
049a803f | 153 | %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD |
06232684 | 154 | %dir %{py_sitedir}/cryptography |
06232684 JB |
155 | %{py_sitedir}/cryptography/*.py[co] |
156 | %dir %{py_sitedir}/cryptography/hazmat | |
157 | %{py_sitedir}/cryptography/hazmat/*.py[co] | |
158 | %dir %{py_sitedir}/cryptography/hazmat/backends | |
159 | %{py_sitedir}/cryptography/hazmat/backends/*.py[co] | |
06232684 JB |
160 | %dir %{py_sitedir}/cryptography/hazmat/backends/openssl |
161 | %{py_sitedir}/cryptography/hazmat/backends/openssl/*.py[co] | |
162 | %dir %{py_sitedir}/cryptography/hazmat/bindings | |
163 | %{py_sitedir}/cryptography/hazmat/bindings/*.py[co] | |
d198b5a4 | 164 | %attr(755,root,root) %{py_sitedir}/cryptography/hazmat/bindings/_*.so |
06232684 JB |
165 | %dir %{py_sitedir}/cryptography/hazmat/bindings/openssl |
166 | %{py_sitedir}/cryptography/hazmat/bindings/openssl/*.py[co] | |
167 | %dir %{py_sitedir}/cryptography/hazmat/primitives | |
168 | %{py_sitedir}/cryptography/hazmat/primitives/*.py[co] | |
169 | %dir %{py_sitedir}/cryptography/hazmat/primitives/asymmetric | |
170 | %{py_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py[co] | |
171 | %dir %{py_sitedir}/cryptography/hazmat/primitives/ciphers | |
172 | %{py_sitedir}/cryptography/hazmat/primitives/ciphers/*.py[co] | |
173 | %dir %{py_sitedir}/cryptography/hazmat/primitives/kdf | |
174 | %{py_sitedir}/cryptography/hazmat/primitives/kdf/*.py[co] | |
f7d88309 AM |
175 | %dir %{py_sitedir}/cryptography/hazmat/primitives/twofactor |
176 | %{py_sitedir}/cryptography/hazmat/primitives/twofactor/*.py[co] | |
d198b5a4 AM |
177 | %dir %{py_sitedir}/cryptography/x509 |
178 | %{py_sitedir}/cryptography/x509/*.py[co] | |
06232684 JB |
179 | %{py_sitedir}/cryptography-%{version}-py*.egg-info |
180 | %endif | |
181 | ||
182 | %if %{with python3} | |
183 | %files -n python3-cryptography | |
184 | %defattr(644,root,root,755) | |
049a803f | 185 | %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD |
06232684 | 186 | %dir %{py3_sitedir}/cryptography |
06232684 JB |
187 | %{py3_sitedir}/cryptography/*.py |
188 | %{py3_sitedir}/cryptography/__pycache__ | |
189 | %dir %{py3_sitedir}/cryptography/hazmat | |
190 | %{py3_sitedir}/cryptography/hazmat/*.py | |
191 | %{py3_sitedir}/cryptography/hazmat/__pycache__ | |
192 | %dir %{py3_sitedir}/cryptography/hazmat/backends | |
193 | %{py3_sitedir}/cryptography/hazmat/backends/*.py | |
194 | %{py3_sitedir}/cryptography/hazmat/backends/__pycache__ | |
06232684 JB |
195 | %dir %{py3_sitedir}/cryptography/hazmat/backends/openssl |
196 | %{py3_sitedir}/cryptography/hazmat/backends/openssl/*.py | |
197 | %{py3_sitedir}/cryptography/hazmat/backends/openssl/__pycache__ | |
198 | %dir %{py3_sitedir}/cryptography/hazmat/bindings | |
199 | %{py3_sitedir}/cryptography/hazmat/bindings/*.py | |
200 | %{py3_sitedir}/cryptography/hazmat/bindings/__pycache__ | |
d198b5a4 | 201 | %attr(755,root,root) %{py3_sitedir}/cryptography/hazmat/bindings/_*.so |
06232684 JB |
202 | %dir %{py3_sitedir}/cryptography/hazmat/bindings/openssl |
203 | %{py3_sitedir}/cryptography/hazmat/bindings/openssl/*.py | |
204 | %{py3_sitedir}/cryptography/hazmat/bindings/openssl/__pycache__ | |
205 | %dir %{py3_sitedir}/cryptography/hazmat/primitives | |
206 | %{py3_sitedir}/cryptography/hazmat/primitives/*.py | |
207 | %{py3_sitedir}/cryptography/hazmat/primitives/__pycache__ | |
208 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric | |
209 | %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py | |
210 | %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/__pycache__ | |
211 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/ciphers | |
212 | %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/*.py | |
213 | %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/__pycache__ | |
214 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/kdf | |
215 | %{py3_sitedir}/cryptography/hazmat/primitives/kdf/*.py | |
216 | %{py3_sitedir}/cryptography/hazmat/primitives/kdf/__pycache__ | |
f7d88309 AM |
217 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor |
218 | %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py | |
219 | %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__ | |
d198b5a4 AM |
220 | %dir %{py3_sitedir}/cryptography/x509 |
221 | %{py3_sitedir}/cryptography/x509/*.py | |
222 | %{py3_sitedir}/cryptography/x509/__pycache__ | |
06232684 JB |
223 | %{py3_sitedir}/cryptography-%{version}-py*.egg-info |
224 | %endif |