]> git.pld-linux.org Git - packages/python3-cryptography.git/blame - python-cryptography.spec
- updated to 2.9.2
[packages/python3-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
29f64bed 11Version: 2.9.2
cddf28e5 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
29f64bed 17# Source0-md5: 89f355fd2500f7b7ce13999afc7cd092
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
29f64bed 20# Source1-md5: 657349b8de73959fc49ba15fd7346b58
06232684 21URL: https://cryptography.io/
29f64bed 22BuildRequires: openssl-devel >= 1.0.2
d331861d 23BuildRequires: rpm-pythonprov >= 5.4.15-48
049a803f 24BuildRequires: rpmbuild(macros) >= 1.714
06232684 25%if %{with python2}
f63b1331 26BuildRequires: python-cffi >= 1.8
29d4b67b 27BuildRequires: python-devel >= 1:2.7
b2fc4ef3 28BuildRequires: python-enum34
29d4b67b
JB
29BuildRequires: python-pytz
30BuildRequires: python-setuptools >= 18.5
06232684 31BuildRequires: python-six >= 1.4.1
049a803f 32%if %{with tests}
29d4b67b 33BuildRequires: python-asn1crypto >= 0.21.0
049a803f
JB
34%if "%{py_ver}" >= "2.7"
35BuildRequires: python-hypothesis >= 1.11.4
36%endif
29d4b67b 37BuildRequires: python-idna >= 2.1
049a803f
JB
38BuildRequires: python-ipaddress
39BuildRequires: python-iso8601
40BuildRequires: python-pretend
29d4b67b 41BuildRequires: python-pytest >= 3.6.0
f63b1331 42BuildRequires: python-pytz
049a803f 43%endif
06232684
JB
44%endif
45%if %{with python3}
f63b1331 46BuildRequires: python3-cffi >= 1.8
29f64bed 47BuildRequires: python3-devel >= 1:3.5
29d4b67b 48BuildRequires: python3-setuptools >= 18.5
06232684 49BuildRequires: python3-six >= 1.4.1
049a803f 50%if %{with tests}
29d4b67b 51BuildRequires: python3-asn1crypto >= 0.21.0
049a803f 52BuildRequires: python3-hypothesis >= 1.11.4
29d4b67b 53BuildRequires: python3-idna >= 2.1
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
JB
60%if %{with doc}
61BuildRequires: python3-sphinx_rtd_theme
62BuildRequires: sphinx-pdg-3 >= 1.6.5
06232684 63%endif
29f64bed 64Requires: openssl >= 1.0.2
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
29f64bed 96Requires: openssl >= 1.0.2
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
29f64bed 127%if "%{_rpmversion}" >= "4.6"
094f23d7
JB
128BuildArch: noarch
129%endif
f63b1331
JB
130
131%description apidocs
132API documentation for cryptography module.
133
134%description apidocs -l pl.UTF-8
135Dokumentacja API modułu cryptography.
136
06232684 137%prep
163a4ef8
JB
138%setup -q -n cryptography-%{version} %{?with_tests:-a1}
139
140%if %{with tests}
141%{__mv} cryptography_vectors-%{version}/cryptography_vectors .
142%endif
06232684
JB
143
144%build
145export CFLAGS="%{rpmcflags}"
146
147%if %{with python2}
503cd915
JB
148%py_build
149
150%if %{with tests}
151PYTHONPATH=$(echo $(pwd)/build-2/lib.*) \
152%{__python} -m pytest tests
153%endif
163a4ef8 154%endif
163a4ef8 155
cddf28e5 156%if %{with python3}
503cd915
JB
157%py3_build
158
159%if %{with tests}
160PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
161%{__python3} -m pytest tests
162%endif
06232684
JB
163%endif
164
f63b1331
JB
165%if %{with doc}
166%{__make} -C docs html \
167 SPHINXBUILD=sphinx-build-3
168%endif
169
06232684
JB
170%install
171rm -rf $RPM_BUILD_ROOT
172
173%if %{with python2}
6d1f8f74 174%py_install
06232684
JB
175
176%py_postclean
177%endif
178
179%if %{with python3}
6d1f8f74 180%py3_install
06232684
JB
181%endif
182
183%clean
184rm -rf $RPM_BUILD_ROOT
185
186%if %{with python2}
187%files
188%defattr(644,root,root,755)
049a803f 189%doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD
06232684 190%dir %{py_sitedir}/cryptography
06232684
JB
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]
06232684
JB
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]
d198b5a4 200%attr(755,root,root) %{py_sitedir}/cryptography/hazmat/bindings/_*.so
06232684
JB
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]
f63b1331
JB
211%dir %{py_sitedir}/cryptography/hazmat/primitives/serialization
212%{py_sitedir}/cryptography/hazmat/primitives/serialization/*.py[co]
f7d88309
AM
213%dir %{py_sitedir}/cryptography/hazmat/primitives/twofactor
214%{py_sitedir}/cryptography/hazmat/primitives/twofactor/*.py[co]
d198b5a4
AM
215%dir %{py_sitedir}/cryptography/x509
216%{py_sitedir}/cryptography/x509/*.py[co]
06232684
JB
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)
049a803f 223%doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD
06232684 224%dir %{py3_sitedir}/cryptography
06232684
JB
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__
06232684
JB
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__
d198b5a4 239%attr(755,root,root) %{py3_sitedir}/cryptography/hazmat/bindings/_*.so
06232684
JB
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__
f63b1331
JB
255%dir %{py3_sitedir}/cryptography/hazmat/primitives/serialization
256%{py3_sitedir}/cryptography/hazmat/primitives/serialization/*.py
257%{py3_sitedir}/cryptography/hazmat/primitives/serialization/__pycache__
f7d88309
AM
258%dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor
259%{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py
260%{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__
d198b5a4
AM
261%dir %{py3_sitedir}/cryptography/x509
262%{py3_sitedir}/cryptography/x509/*.py
263%{py3_sitedir}/cryptography/x509/__pycache__
06232684
JB
264%{py3_sitedir}/cryptography-%{version}-py*.egg-info
265%endif
f63b1331
JB
266
267%if %{with doc}
268%files apidocs
269%defattr(644,root,root,755)
503cd915 270%doc docs/_build/html/{_downloads,_static,development,hazmat,x509,*.html,*.js}
f63b1331 271%endif
This page took 0.105625 seconds and 4 git commands to generate.