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