]> git.pld-linux.org Git - packages/python3-cryptography.git/blob - python3-cryptography.spec
- up to 35.0.0, requires rust and setuptools_rust
[packages/python3-cryptography.git] / python3-cryptography.spec
1 #
2 # Conditional build:
3 %bcond_without  doc     # Sphinx documentation
4 %bcond_without  tests   # unit test
5
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
11 License:        Apache v2.0 or BSD
12 Group:          Libraries/Python
13 #Source0Download: https://pypi.org/simple/cryptography/
14 Source0:        https://files.pythonhosted.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
15 # Source0-md5:  ba34eba3ae36cbf3d2e1ee3239f07732
16 #Source1Download: https://pypi.org/simple/cryptography_vectors/
17 Source1:        https://files.pythonhosted.org/packages/source/c/cryptography-vectors/cryptography_vectors-%{version}.tar.gz
18 # Source1-md5:  8e9d050bd601d1788883fa361c69cf85
19 URL:            https://cryptography.io/
20 BuildRequires:  openssl-devel >= 1.1.0
21 BuildRequires:  rpm-pythonprov >= 5.4.15-48
22 BuildRequires:  rpmbuild(macros) >= 1.714
23 BuildRequires:  rust
24 BuildRequires:  python3-cffi >= 1.12
25 BuildRequires:  python3-devel >= 1:3.6
26 BuildRequires:  python3-setuptools >= 18.5
27 BuildRequires:  python3-six >= 1.4.1
28 %if %{with tests}
29 BuildRequires:  python3-hypothesis >= 1.11.4
30 BuildRequires:  python3-iso8601
31 BuildRequires:  python3-pretend
32 BuildRequires:  python3-pytest >= 3.6.0
33 BuildRequires:  python3-pytz
34 %endif
35 %if %{with doc}
36 BuildRequires:  python3-sphinx_rtd_theme
37 BuildRequires:  sphinx-pdg-3 >= 1.6.5
38 %endif
39 Requires:       openssl >= 1.1.0
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 cryptography is a package which provides cryptographic recipes and
44 primitives to Python developers. Our goal is for it to be your
45 "cryptographic standard library". It supports Python 3.6+ and
46 PyPy3 7.2+.
47
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.
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
56 Pythona 3.6+ oraz PyPy 7.2+.
57
58 cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
59 niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
60 takich jak szyfry symetryczne, skróty wiadomości czy funkcje
61 wyprowadzające klucze.
62
63 %package apidocs
64 Summary:        API documentation for cryptography module
65 Summary(pl.UTF-8):      Dokumentacja API modułu cryptography
66 Group:          Documentation
67 BuildArch:      noarch
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
75 %prep
76 %setup -q -n cryptography-%{version} %{?with_tests:-a1}
77
78 %if %{with tests}
79 %{__mv} cryptography_vectors-%{version}/cryptography_vectors .
80 %endif
81
82 %build
83 export CFLAGS="%{rpmcflags}"
84
85 %py3_build
86
87 %if %{with tests}
88 PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
89 %{__python3} -m pytest tests
90 %endif
91
92 %if %{with doc}
93 %{__make} -C docs html \
94         SPHINXBUILD=sphinx-build-3
95 %endif
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99
100 %py3_install
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %files
106 %defattr(644,root,root,755)
107 %doc AUTHORS.rst README.rst LICENSE LICENSE.APACHE LICENSE.BSD
108 %dir %{py3_sitedir}/cryptography
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__
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__
123 %attr(755,root,root) %{py3_sitedir}/cryptography/hazmat/bindings/_*.so
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__
139 %dir %{py3_sitedir}/cryptography/hazmat/primitives/serialization
140 %{py3_sitedir}/cryptography/hazmat/primitives/serialization/*.py
141 %{py3_sitedir}/cryptography/hazmat/primitives/serialization/__pycache__
142 %dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor
143 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py
144 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__
145 %dir %{py3_sitedir}/cryptography/x509
146 %{py3_sitedir}/cryptography/x509/*.py
147 %{py3_sitedir}/cryptography/x509/__pycache__
148 %{py3_sitedir}/cryptography-%{version}-py*.egg-info
149
150 %if %{with doc}
151 %files apidocs
152 %defattr(644,root,root,755)
153 %doc docs/_build/html/{_downloads,_static,development,hazmat,x509,*.html,*.js}
154 %endif
This page took 0.108151 seconds and 3 git commands to generate.