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