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