]>
Commit | Line | Data |
---|---|---|
06232684 JB |
1 | # |
2 | # Conditional build: | |
f63b1331 | 3 | %bcond_without doc # Sphinx documentation |
163a4ef8 | 4 | %bcond_without tests # unit test |
06232684 | 5 | |
59f13c5c JR |
6 | Summary: Crypthography library for Python 3 |
7 | Summary(pl.UTF-8): Biblioteka Cryptography dla Pythona 3 | |
8 | Name: python3-cryptography | |
9 | Version: 35.0.0 | |
10 | Release: 0.1 | |
d6e7edf5 | 11 | License: Apache v2.0 or BSD |
06232684 | 12 | Group: Libraries/Python |
29d4b67b | 13 | #Source0Download: https://pypi.org/simple/cryptography/ |
7df50b22 | 14 | Source0: https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz |
59f13c5c | 15 | # Source0-md5: ba34eba3ae36cbf3d2e1ee3239f07732 |
163a4ef8 JB |
16 | #Source1Download: https://pypi.org/simple/cryptography_vectors/ |
17 | Source1: https://files.pythonhosted.org/packages/source/c/cryptography-vectors/cryptography_vectors-%{version}.tar.gz | |
59f13c5c | 18 | # Source1-md5: 8e9d050bd601d1788883fa361c69cf85 |
06232684 | 19 | URL: https://cryptography.io/ |
0f792d56 | 20 | BuildRequires: openssl-devel >= 1.1.0 |
d331861d | 21 | BuildRequires: rpm-pythonprov >= 5.4.15-48 |
049a803f | 22 | BuildRequires: rpmbuild(macros) >= 1.714 |
59f13c5c | 23 | BuildRequires: rust |
0f792d56 JB |
24 | BuildRequires: python3-cffi >= 1.12 |
25 | BuildRequires: python3-devel >= 1:3.6 | |
29d4b67b | 26 | BuildRequires: python3-setuptools >= 18.5 |
06232684 | 27 | BuildRequires: python3-six >= 1.4.1 |
049a803f | 28 | %if %{with tests} |
049a803f | 29 | BuildRequires: python3-hypothesis >= 1.11.4 |
049a803f JB |
30 | BuildRequires: python3-iso8601 |
31 | BuildRequires: python3-pretend | |
29d4b67b | 32 | BuildRequires: python3-pytest >= 3.6.0 |
f63b1331 JB |
33 | BuildRequires: python3-pytz |
34 | %endif | |
f63b1331 JB |
35 | %if %{with doc} |
36 | BuildRequires: python3-sphinx_rtd_theme | |
37 | BuildRequires: sphinx-pdg-3 >= 1.6.5 | |
06232684 | 38 | %endif |
0f792d56 | 39 | Requires: openssl >= 1.1.0 |
06232684 JB |
40 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
41 | ||
42 | %description | |
59f13c5c | 43 | cryptography is a package which provides cryptographic recipes and |
06232684 | 44 | primitives to Python developers. Our goal is for it to be your |
59f13c5c JR |
45 | "cryptographic standard library". It supports Python 3.6+ and |
46 | PyPy3 7.2+. | |
06232684 | 47 | |
59f13c5c JR |
48 | cryptography includes both high level recipes and low level interfaces |
49 | to common cryptographic algorithms such as symmetric ciphers, message | |
50 | digests, and key derivation functions. | |
06232684 JB |
51 | |
52 | %description -l pl.UTF-8 | |
53 | cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i | |
54 | obiektów kryptograficznych programistom Pythona. Celem jest | |
55 | dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje | |
59f13c5c | 56 | Pythona 3.6+ oraz PyPy 7.2+. |
06232684 JB |
57 | |
58 | cryptography zawiera zarówno funkcje wysokopoziomowe, jak i | |
59 | niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych, | |
226a2f8d | 60 | takich jak szyfry symetryczne, skróty wiadomości czy funkcje |
06232684 JB |
61 | wyprowadzające klucze. |
62 | ||
f63b1331 JB |
63 | %package apidocs |
64 | Summary: API documentation for cryptography module | |
65 | Summary(pl.UTF-8): Dokumentacja API modułu cryptography | |
66 | Group: Documentation | |
094f23d7 | 67 | BuildArch: noarch |
f63b1331 JB |
68 | |
69 | %description apidocs | |
70 | API documentation for cryptography module. | |
71 | ||
72 | %description apidocs -l pl.UTF-8 | |
73 | Dokumentacja API modułu cryptography. | |
74 | ||
06232684 | 75 | %prep |
163a4ef8 JB |
76 | %setup -q -n cryptography-%{version} %{?with_tests:-a1} |
77 | ||
78 | %if %{with tests} | |
79 | %{__mv} cryptography_vectors-%{version}/cryptography_vectors . | |
80 | %endif | |
06232684 JB |
81 | |
82 | %build | |
83 | export CFLAGS="%{rpmcflags}" | |
84 | ||
503cd915 JB |
85 | %py3_build |
86 | ||
87 | %if %{with tests} | |
88 | PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \ | |
89 | %{__python3} -m pytest tests | |
90 | %endif | |
06232684 | 91 | |
f63b1331 JB |
92 | %if %{with doc} |
93 | %{__make} -C docs html \ | |
94 | SPHINXBUILD=sphinx-build-3 | |
95 | %endif | |
96 | ||
06232684 JB |
97 | %install |
98 | rm -rf $RPM_BUILD_ROOT | |
99 | ||
6d1f8f74 | 100 | %py3_install |
06232684 JB |
101 | |
102 | %clean | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
06232684 JB |
105 | %files |
106 | %defattr(644,root,root,755) | |
049a803f | 107 | %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD |
06232684 | 108 | %dir %{py3_sitedir}/cryptography |
06232684 JB |
109 | %{py3_sitedir}/cryptography/*.py |
110 | %{py3_sitedir}/cryptography/__pycache__ | |
111 | %dir %{py3_sitedir}/cryptography/hazmat | |
112 | %{py3_sitedir}/cryptography/hazmat/*.py | |
113 | %{py3_sitedir}/cryptography/hazmat/__pycache__ | |
114 | %dir %{py3_sitedir}/cryptography/hazmat/backends | |
115 | %{py3_sitedir}/cryptography/hazmat/backends/*.py | |
116 | %{py3_sitedir}/cryptography/hazmat/backends/__pycache__ | |
06232684 JB |
117 | %dir %{py3_sitedir}/cryptography/hazmat/backends/openssl |
118 | %{py3_sitedir}/cryptography/hazmat/backends/openssl/*.py | |
119 | %{py3_sitedir}/cryptography/hazmat/backends/openssl/__pycache__ | |
120 | %dir %{py3_sitedir}/cryptography/hazmat/bindings | |
121 | %{py3_sitedir}/cryptography/hazmat/bindings/*.py | |
122 | %{py3_sitedir}/cryptography/hazmat/bindings/__pycache__ | |
d198b5a4 | 123 | %attr(755,root,root) %{py3_sitedir}/cryptography/hazmat/bindings/_*.so |
06232684 JB |
124 | %dir %{py3_sitedir}/cryptography/hazmat/bindings/openssl |
125 | %{py3_sitedir}/cryptography/hazmat/bindings/openssl/*.py | |
126 | %{py3_sitedir}/cryptography/hazmat/bindings/openssl/__pycache__ | |
127 | %dir %{py3_sitedir}/cryptography/hazmat/primitives | |
128 | %{py3_sitedir}/cryptography/hazmat/primitives/*.py | |
129 | %{py3_sitedir}/cryptography/hazmat/primitives/__pycache__ | |
130 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric | |
131 | %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py | |
132 | %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/__pycache__ | |
133 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/ciphers | |
134 | %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/*.py | |
135 | %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/__pycache__ | |
136 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/kdf | |
137 | %{py3_sitedir}/cryptography/hazmat/primitives/kdf/*.py | |
138 | %{py3_sitedir}/cryptography/hazmat/primitives/kdf/__pycache__ | |
f63b1331 JB |
139 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/serialization |
140 | %{py3_sitedir}/cryptography/hazmat/primitives/serialization/*.py | |
141 | %{py3_sitedir}/cryptography/hazmat/primitives/serialization/__pycache__ | |
f7d88309 AM |
142 | %dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor |
143 | %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py | |
144 | %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__ | |
d198b5a4 AM |
145 | %dir %{py3_sitedir}/cryptography/x509 |
146 | %{py3_sitedir}/cryptography/x509/*.py | |
147 | %{py3_sitedir}/cryptography/x509/__pycache__ | |
06232684 | 148 | %{py3_sitedir}/cryptography-%{version}-py*.egg-info |
f63b1331 JB |
149 | |
150 | %if %{with doc} | |
151 | %files apidocs | |
152 | %defattr(644,root,root,755) | |
503cd915 | 153 | %doc docs/_build/html/{_downloads,_static,development,hazmat,x509,*.html,*.js} |
f63b1331 | 154 | %endif |