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