]> git.pld-linux.org Git - packages/python-cryptography.git/blob - python-cryptography.spec
c94ad5c5ba23d93bc619f35a3e56d383289759e1
[packages/python-cryptography.git] / python-cryptography.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_with     python3 # CPython 3.x module
5 %bcond_without  doc     # Sphinx documentation
6 %bcond_without  tests   # unit tests
7
8 Summary:        Crypthography library for Python 2
9 Summary(pl.UTF-8):      Biblioteka Cryptography dla Pythona 2
10 Name:           python-cryptography
11 Version:        3.3.2
12 Release:        1
13 License:        Apache v2.0 or BSD
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.org/simple/cryptography/
16 Source0:        https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
17 # Source0-md5:  e2ce2ec8a63965fad351f36ed70fde4b
18 #Source1Download: https://pypi.org/simple/cryptography_vectors/
19 Source1:        https://files.pythonhosted.org/packages/source/c/cryptography-vectors/cryptography_vectors-%{version}.tar.gz
20 # Source1-md5:  79785df0f2d43f05895991b7e067a2ce
21 Patch0:         openssl3.patch
22 Patch1:         openssl3-tests.patch
23 URL:            https://cryptography.io/
24 BuildRequires:  openssl-devel >= 1.1.0
25 BuildRequires:  rpm-build >= 4.6
26 BuildRequires:  rpm-pythonprov >= 5.4.15-48
27 BuildRequires:  rpmbuild(macros) >= 1.714
28 %if %{with python2}
29 BuildRequires:  python-cffi >= 1.12
30 BuildRequires:  python-devel >= 1:2.7
31 BuildRequires:  python-enum34
32 BuildRequires:  python-pytz
33 BuildRequires:  python-setuptools >= 1:18.5
34 BuildRequires:  python-six >= 1.4.1
35 %if %{with tests}
36 %if "%{py_ver}" >= "2.7"
37 BuildRequires:  python-hypothesis >= 1.11.4
38 %endif
39 BuildRequires:  python-ipaddress
40 BuildRequires:  python-iso8601
41 BuildRequires:  python-pretend
42 BuildRequires:  python-pytest >= 3.6.0
43 BuildRequires:  python-pytz
44 %endif
45 %endif
46 %if %{with python3}
47 BuildRequires:  python3-cffi >= 1.12
48 BuildRequires:  python3-devel >= 1:3.6
49 BuildRequires:  python3-setuptools >= 1:18.5
50 BuildRequires:  python3-six >= 1.4.1
51 %if %{with tests}
52 BuildRequires:  python3-hypothesis >= 1.11.4
53 BuildRequires:  python3-iso8601
54 BuildRequires:  python3-pretend
55 BuildRequires:  python3-pytest >= 3.6.0
56 BuildRequires:  python3-pytz
57 %endif
58 %endif
59 %if %{with doc}
60 BuildRequires:  python-sphinx_rtd_theme
61 BuildRequires:  sphinx-pdg-2 >= 1.6.5
62 %endif
63 Requires:       openssl >= 1.1.0
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.7, Python 3.4+,
70 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.7, Pythona 3.4+ oraz PyPy.
83
84 cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
85 niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
86 takich jak szyfry symetryczne, skróty wiadomości czy funkcje
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
95 Requires:       openssl >= 1.1.0
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.7, Python 3.4+,
101 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.7, Pythona 3.4+ oraz PyPy.
114
115 cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
116 niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
117 takich jak szyfry symetryczne, skróty wiadomości czy funkcje
118 wyprowadzające klucze.
119
120 Ten pakiet zawiera moduły Pythona 3.
121
122 %package apidocs
123 Summary:        API documentation for cryptography module
124 Summary(pl.UTF-8):      Dokumentacja API modułu cryptography
125 Group:          Documentation
126 BuildArch:      noarch
127
128 %description apidocs
129 API documentation for cryptography module.
130
131 %description apidocs -l pl.UTF-8
132 Dokumentacja API modułu cryptography.
133
134 %prep
135 %setup -q -n cryptography-%{version} %{?with_tests:-a1}
136 %patch0 -p1
137
138 # Do not test legacy, disabled by default algorithms
139 # See man OSSL_PROVIDER-legacy(7)
140 %{__rm} tests/hazmat/primitives/test_{arc4,blowfish,cast5,idea,seed}.py
141
142 %if %{with tests}
143 %{__mv} cryptography_vectors-%{version}/cryptography_vectors .
144 %patch1 -p1
145 %endif
146
147 %build
148 export CFLAGS="%{rpmcflags}"
149
150 %if %{with python2}
151 %py_build
152
153 %if %{with tests}
154 PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
155 %{__python} -m pytest tests
156 %endif
157 %endif
158
159 %if %{with python3}
160 %py3_build
161
162 %if %{with tests}
163 PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
164 %{__python3} -m pytest tests
165 %endif
166 %endif
167
168 %if %{with doc}
169 %{__make} -C docs html \
170         SPHINXBUILD=sphinx-build-2
171 %endif
172
173 %install
174 rm -rf $RPM_BUILD_ROOT
175
176 %if %{with python2}
177 %py_install
178
179 %py_postclean
180 %endif
181
182 %if %{with python3}
183 %py3_install
184 %endif
185
186 %clean
187 rm -rf $RPM_BUILD_ROOT
188
189 %if %{with python2}
190 %files
191 %defattr(644,root,root,755)
192 %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD
193 %dir %{py_sitedir}/cryptography
194 %{py_sitedir}/cryptography/*.py[co]
195 %dir %{py_sitedir}/cryptography/hazmat
196 %{py_sitedir}/cryptography/hazmat/*.py[co]
197 %dir %{py_sitedir}/cryptography/hazmat/backends
198 %{py_sitedir}/cryptography/hazmat/backends/*.py[co]
199 %dir %{py_sitedir}/cryptography/hazmat/backends/openssl
200 %{py_sitedir}/cryptography/hazmat/backends/openssl/*.py[co]
201 %dir %{py_sitedir}/cryptography/hazmat/bindings
202 %{py_sitedir}/cryptography/hazmat/bindings/*.py[co]
203 %attr(755,root,root) %{py_sitedir}/cryptography/hazmat/bindings/_*.so
204 %dir %{py_sitedir}/cryptography/hazmat/bindings/openssl
205 %{py_sitedir}/cryptography/hazmat/bindings/openssl/*.py[co]
206 %dir %{py_sitedir}/cryptography/hazmat/primitives
207 %{py_sitedir}/cryptography/hazmat/primitives/*.py[co]
208 %dir %{py_sitedir}/cryptography/hazmat/primitives/asymmetric
209 %{py_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py[co]
210 %dir %{py_sitedir}/cryptography/hazmat/primitives/ciphers
211 %{py_sitedir}/cryptography/hazmat/primitives/ciphers/*.py[co]
212 %dir %{py_sitedir}/cryptography/hazmat/primitives/kdf
213 %{py_sitedir}/cryptography/hazmat/primitives/kdf/*.py[co]
214 %dir %{py_sitedir}/cryptography/hazmat/primitives/serialization
215 %{py_sitedir}/cryptography/hazmat/primitives/serialization/*.py[co]
216 %dir %{py_sitedir}/cryptography/hazmat/primitives/twofactor
217 %{py_sitedir}/cryptography/hazmat/primitives/twofactor/*.py[co]
218 %dir %{py_sitedir}/cryptography/x509
219 %{py_sitedir}/cryptography/x509/*.py[co]
220 %{py_sitedir}/cryptography-%{version}-py*.egg-info
221 %endif
222
223 %if %{with python3}
224 %files -n python3-cryptography
225 %defattr(644,root,root,755)
226 %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD
227 %dir %{py3_sitedir}/cryptography
228 %{py3_sitedir}/cryptography/*.py
229 %{py3_sitedir}/cryptography/__pycache__
230 %dir %{py3_sitedir}/cryptography/hazmat
231 %{py3_sitedir}/cryptography/hazmat/*.py
232 %{py3_sitedir}/cryptography/hazmat/__pycache__
233 %dir %{py3_sitedir}/cryptography/hazmat/backends
234 %{py3_sitedir}/cryptography/hazmat/backends/*.py
235 %{py3_sitedir}/cryptography/hazmat/backends/__pycache__
236 %dir %{py3_sitedir}/cryptography/hazmat/backends/openssl
237 %{py3_sitedir}/cryptography/hazmat/backends/openssl/*.py
238 %{py3_sitedir}/cryptography/hazmat/backends/openssl/__pycache__
239 %dir %{py3_sitedir}/cryptography/hazmat/bindings
240 %{py3_sitedir}/cryptography/hazmat/bindings/*.py
241 %{py3_sitedir}/cryptography/hazmat/bindings/__pycache__
242 %attr(755,root,root) %{py3_sitedir}/cryptography/hazmat/bindings/_*.so
243 %dir %{py3_sitedir}/cryptography/hazmat/bindings/openssl
244 %{py3_sitedir}/cryptography/hazmat/bindings/openssl/*.py
245 %{py3_sitedir}/cryptography/hazmat/bindings/openssl/__pycache__
246 %dir %{py3_sitedir}/cryptography/hazmat/primitives
247 %{py3_sitedir}/cryptography/hazmat/primitives/*.py
248 %{py3_sitedir}/cryptography/hazmat/primitives/__pycache__
249 %dir %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric
250 %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py
251 %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/__pycache__
252 %dir %{py3_sitedir}/cryptography/hazmat/primitives/ciphers
253 %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/*.py
254 %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/__pycache__
255 %dir %{py3_sitedir}/cryptography/hazmat/primitives/kdf
256 %{py3_sitedir}/cryptography/hazmat/primitives/kdf/*.py
257 %{py3_sitedir}/cryptography/hazmat/primitives/kdf/__pycache__
258 %dir %{py3_sitedir}/cryptography/hazmat/primitives/serialization
259 %{py3_sitedir}/cryptography/hazmat/primitives/serialization/*.py
260 %{py3_sitedir}/cryptography/hazmat/primitives/serialization/__pycache__
261 %dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor
262 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py
263 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__
264 %dir %{py3_sitedir}/cryptography/x509
265 %{py3_sitedir}/cryptography/x509/*.py
266 %{py3_sitedir}/cryptography/x509/__pycache__
267 %{py3_sitedir}/cryptography-%{version}-py*.egg-info
268 %endif
269
270 %if %{with doc}
271 %files apidocs
272 %defattr(644,root,root,755)
273 %doc docs/_build/html/{_downloads,_static,development,hazmat,x509,*.html,*.js}
274 %endif
This page took 0.054458 seconds and 2 git commands to generate.