]> git.pld-linux.org Git - packages/python-cryptography.git/blame - python-cryptography.spec
- updated to 3.3.2, use python2 for docs
[packages/python-cryptography.git] / python-cryptography.spec
CommitLineData
06232684
JB
1#
2# Conditional build:
049a803f 3%bcond_without python2 # CPython 2.x module
c9ed3111 4%bcond_with python3 # CPython 3.x module
f63b1331 5%bcond_without doc # Sphinx documentation
7afe5e45 6%bcond_without tests # unit tests
06232684
JB
7
8Summary: Crypthography library for Python 2
9Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 2
10Name: python-cryptography
7afe5e45
JB
11Version: 3.3.2
12Release: 1
d6e7edf5 13License: Apache v2.0 or BSD
06232684 14Group: Libraries/Python
29d4b67b 15#Source0Download: https://pypi.org/simple/cryptography/
7df50b22 16Source0: https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
7afe5e45 17# Source0-md5: e2ce2ec8a63965fad351f36ed70fde4b
163a4ef8
JB
18#Source1Download: https://pypi.org/simple/cryptography_vectors/
19Source1: https://files.pythonhosted.org/packages/source/c/cryptography-vectors/cryptography_vectors-%{version}.tar.gz
7afe5e45 20# Source1-md5: 79785df0f2d43f05895991b7e067a2ce
ff0d2aa0 21Patch0: openssl3.patch
d3ce35eb 22Patch1: openssl3-tests.patch
06232684 23URL: https://cryptography.io/
0f792d56 24BuildRequires: openssl-devel >= 1.1.0
7afe5e45 25BuildRequires: rpm-build >= 4.6
d331861d 26BuildRequires: rpm-pythonprov >= 5.4.15-48
049a803f 27BuildRequires: rpmbuild(macros) >= 1.714
06232684 28%if %{with python2}
0f792d56 29BuildRequires: python-cffi >= 1.12
29d4b67b 30BuildRequires: python-devel >= 1:2.7
b2fc4ef3 31BuildRequires: python-enum34
29d4b67b 32BuildRequires: python-pytz
c43fdbf6 33BuildRequires: python-setuptools >= 1:18.5
06232684 34BuildRequires: python-six >= 1.4.1
049a803f 35%if %{with tests}
049a803f
JB
36%if "%{py_ver}" >= "2.7"
37BuildRequires: python-hypothesis >= 1.11.4
38%endif
049a803f
JB
39BuildRequires: python-ipaddress
40BuildRequires: python-iso8601
41BuildRequires: python-pretend
29d4b67b 42BuildRequires: python-pytest >= 3.6.0
f63b1331 43BuildRequires: python-pytz
049a803f 44%endif
06232684
JB
45%endif
46%if %{with python3}
0f792d56
JB
47BuildRequires: python3-cffi >= 1.12
48BuildRequires: python3-devel >= 1:3.6
c43fdbf6 49BuildRequires: python3-setuptools >= 1:18.5
06232684 50BuildRequires: python3-six >= 1.4.1
049a803f 51%if %{with tests}
049a803f 52BuildRequires: python3-hypothesis >= 1.11.4
049a803f
JB
53BuildRequires: python3-iso8601
54BuildRequires: python3-pretend
29d4b67b 55BuildRequires: python3-pytest >= 3.6.0
f63b1331
JB
56BuildRequires: python3-pytz
57%endif
049a803f 58%endif
f63b1331 59%if %{with doc}
7afe5e45
JB
60BuildRequires: python-sphinx_rtd_theme
61BuildRequires: sphinx-pdg-2 >= 1.6.5
06232684 62%endif
0f792d56 63Requires: openssl >= 1.1.0
06232684
JB
64BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
65
66%description
67cryptography is a package designed to expose cryptographic recipes and
68primitives to Python developers. Our goal is for it to be your
163a4ef8
JB
69"cryptographic standard library". It supports Python 2.7, Python 3.4+,
70and PyPy.
06232684
JB
71
72cryptography includes both high level recipes, and low level
73interfaces to common cryptographic algorithms such as symmetric
74ciphers, message digests and key derivation functions.
75
76This package contains Python 2 modules.
77
78%description -l pl.UTF-8
79cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i
80obiektów kryptograficznych programistom Pythona. Celem jest
81dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje
163a4ef8 82Pythona 2.7, Pythona 3.4+ oraz PyPy.
06232684
JB
83
84cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
85niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
226a2f8d 86takich jak szyfry symetryczne, skróty wiadomości czy funkcje
06232684
JB
87wyprowadzające klucze.
88
89Ten pakiet zawiera moduły Pythona 2.
90
91%package -n python3-cryptography
92Summary: Crypthography library for Python 3
93Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 3
94Group: Libraries/Python
0f792d56 95Requires: openssl >= 1.1.0
06232684
JB
96
97%description -n python3-cryptography
98cryptography is a package designed to expose cryptographic recipes and
99primitives to Python developers. Our goal is for it to be your
163a4ef8
JB
100"cryptographic standard library". It supports Python 2.7, Python 3.4+,
101and PyPy.
06232684
JB
102
103cryptography includes both high level recipes, and low level
104interfaces to common cryptographic algorithms such as symmetric
105ciphers, message digests and key derivation functions.
106
107This package contains Python 3 modules.
108
109%description -n python3-cryptography -l pl.UTF-8
110cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i
111obiektów kryptograficznych programistom Pythona. Celem jest
112dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje
163a4ef8 113Pythona 2.7, Pythona 3.4+ oraz PyPy.
06232684
JB
114
115cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
116niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
226a2f8d 117takich jak szyfry symetryczne, skróty wiadomości czy funkcje
06232684
JB
118wyprowadzające klucze.
119
120Ten pakiet zawiera moduły Pythona 3.
121
f63b1331
JB
122%package apidocs
123Summary: API documentation for cryptography module
124Summary(pl.UTF-8): Dokumentacja API modułu cryptography
125Group: Documentation
094f23d7 126BuildArch: noarch
f63b1331
JB
127
128%description apidocs
129API documentation for cryptography module.
130
131%description apidocs -l pl.UTF-8
132Dokumentacja API modułu cryptography.
133
06232684 134%prep
163a4ef8 135%setup -q -n cryptography-%{version} %{?with_tests:-a1}
ff0d2aa0 136%patch0 -p1
163a4ef8 137
7afe5e45 138# Do not test legacy, disabled by default algorithms
c9ed3111
JR
139# See man OSSL_PROVIDER-legacy(7)
140%{__rm} tests/hazmat/primitives/test_{arc4,blowfish,cast5,idea,seed}.py
141
163a4ef8
JB
142%if %{with tests}
143%{__mv} cryptography_vectors-%{version}/cryptography_vectors .
d3ce35eb 144%patch1 -p1
163a4ef8 145%endif
06232684
JB
146
147%build
148export CFLAGS="%{rpmcflags}"
149
150%if %{with python2}
503cd915
JB
151%py_build
152
153%if %{with tests}
154PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
155%{__python} -m pytest tests
156%endif
163a4ef8 157%endif
163a4ef8 158
cddf28e5 159%if %{with python3}
503cd915
JB
160%py3_build
161
162%if %{with tests}
163PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
164%{__python3} -m pytest tests
165%endif
06232684
JB
166%endif
167
f63b1331
JB
168%if %{with doc}
169%{__make} -C docs html \
7afe5e45 170 SPHINXBUILD=sphinx-build-2
f63b1331
JB
171%endif
172
06232684
JB
173%install
174rm -rf $RPM_BUILD_ROOT
175
176%if %{with python2}
6d1f8f74 177%py_install
06232684
JB
178
179%py_postclean
180%endif
181
182%if %{with python3}
6d1f8f74 183%py3_install
06232684
JB
184%endif
185
186%clean
187rm -rf $RPM_BUILD_ROOT
188
189%if %{with python2}
190%files
191%defattr(644,root,root,755)
049a803f 192%doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD
06232684 193%dir %{py_sitedir}/cryptography
06232684
JB
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]
06232684
JB
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]
d198b5a4 203%attr(755,root,root) %{py_sitedir}/cryptography/hazmat/bindings/_*.so
06232684
JB
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]
f63b1331
JB
214%dir %{py_sitedir}/cryptography/hazmat/primitives/serialization
215%{py_sitedir}/cryptography/hazmat/primitives/serialization/*.py[co]
f7d88309
AM
216%dir %{py_sitedir}/cryptography/hazmat/primitives/twofactor
217%{py_sitedir}/cryptography/hazmat/primitives/twofactor/*.py[co]
d198b5a4
AM
218%dir %{py_sitedir}/cryptography/x509
219%{py_sitedir}/cryptography/x509/*.py[co]
06232684
JB
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)
049a803f 226%doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD
06232684 227%dir %{py3_sitedir}/cryptography
06232684
JB
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__
06232684
JB
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__
d198b5a4 242%attr(755,root,root) %{py3_sitedir}/cryptography/hazmat/bindings/_*.so
06232684
JB
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__
f63b1331
JB
258%dir %{py3_sitedir}/cryptography/hazmat/primitives/serialization
259%{py3_sitedir}/cryptography/hazmat/primitives/serialization/*.py
260%{py3_sitedir}/cryptography/hazmat/primitives/serialization/__pycache__
f7d88309
AM
261%dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor
262%{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py
263%{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__
d198b5a4
AM
264%dir %{py3_sitedir}/cryptography/x509
265%{py3_sitedir}/cryptography/x509/*.py
266%{py3_sitedir}/cryptography/x509/__pycache__
06232684
JB
267%{py3_sitedir}/cryptography-%{version}-py*.egg-info
268%endif
f63b1331
JB
269
270%if %{with doc}
271%files apidocs
272%defattr(644,root,root,755)
503cd915 273%doc docs/_build/html/{_downloads,_static,development,hazmat,x509,*.html,*.js}
f63b1331 274%endif
This page took 0.153089 seconds and 4 git commands to generate.