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