]> git.pld-linux.org Git - packages/python3-cryptography.git/blob - python-cryptography.spec
3882113384ba799daae1ab451f7cc46d7f46f678
[packages/python3-cryptography.git] / python-cryptography.spec
1 #
2 # Conditional build:
3 %bcond_without  python2 # CPython 2.x module
4 %bcond_without  python3 # CPython 3.x module
5
6 Summary:        Crypthography library for Python 2
7 Summary(pl.UTF-8):      Biblioteka Cryptography dla Pythona 2
8 Name:           python-cryptography
9 Version:        0.8.2
10 Release:        3
11 License:        Apache v2.0 or BSD
12 Group:          Libraries/Python
13 Source0:        https://pypi.python.org/packages/source/c/cryptography/cryptography-%{version}.tar.gz
14 # Source0-md5:  7d33499e851300c194cbb0396de72462
15 URL:            https://cryptography.io/
16 BuildRequires:  openssl-devel >= 0.9.8
17 BuildRequires:  rpm-pythonprov
18 BuildRequires:  rpmbuild(macros) >= 1.612
19 %if %{with python2}
20 BuildRequires:  python-cffi >= 0.8
21 BuildRequires:  python-devel >= 1:2.6
22 BuildRequires:  python-enum34
23 BuildRequires:  python-pyasn1
24 BuildRequires:  python-setuptools
25 BuildRequires:  python-six >= 1.4.1
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-cffi >= 0.8
29 BuildRequires:  python3-devel >= 1:3.2
30 BuildRequires:  python3-pyasn1
31 BuildRequires:  python3-setuptools
32 BuildRequires:  python3-six >= 1.4.1
33 %endif
34 Requires:       python-cffi >= 0.8
35 Requires:       python-six >= 1.4.1
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %description
39 cryptography is a package designed to expose cryptographic recipes and
40 primitives to Python developers. Our goal is for it to be your
41 "cryptographic standard library". It supports Python 2.6-2.7, Python
42 3.2+, and PyPy.
43
44 cryptography includes both high level recipes, and low level
45 interfaces to common cryptographic algorithms such as symmetric
46 ciphers, message digests and key derivation functions.
47
48 This package contains Python 2 modules.
49
50 %description -l pl.UTF-8
51 cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i
52 obiektów kryptograficznych programistom Pythona. Celem jest
53 dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje
54 Pythona 2.6-2.7, Pythona 3.2+ oraz PyPy.
55
56 cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
57 niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
58 takich jak szyfry symetryczne, skróty wiadomości czy funkcje
59 wyprowadzające klucze.
60
61 Ten pakiet zawiera moduły Pythona 2.
62
63 %package -n python3-cryptography
64 Summary:        Crypthography library for Python 3
65 Summary(pl.UTF-8):      Biblioteka Cryptography dla Pythona 3
66 Group:          Libraries/Python
67 Requires:       python3-cffi >= 0.8
68 Requires:       python3-six >= 1.4.1
69
70 %description -n python3-cryptography
71 cryptography is a package designed to expose cryptographic recipes and
72 primitives to Python developers. Our goal is for it to be your
73 "cryptographic standard library". It supports Python 2.6-2.7, Python
74 3.2+, and PyPy.
75
76 cryptography includes both high level recipes, and low level
77 interfaces to common cryptographic algorithms such as symmetric
78 ciphers, message digests and key derivation functions.
79
80 This package contains Python 3 modules.
81
82 %description -n python3-cryptography -l pl.UTF-8
83 cryptography to pakiet zaprojektowany w celu udostępnienia funkcji i
84 obiektów kryptograficznych programistom Pythona. Celem jest
85 dostarczenie "standardowej biblioteki kryptograficznej". Obsługuje
86 Pythona 2.6-2.7, Pythona 3.2+ oraz PyPy.
87
88 cryptography zawiera zarówno funkcje wysokopoziomowe, jak i
89 niskopoziomowe interfejsy do popularnych algorytmów kryptograficznych,
90 takich jak szyfry symetryczne, skróty wiadomości czy funkcje
91 wyprowadzające klucze.
92
93 Ten pakiet zawiera moduły Pythona 3.
94
95 %prep
96 %setup -q -n cryptography-%{version}
97
98 %build
99 export CFLAGS="%{rpmcflags}"
100
101 %if %{with python2}
102 %{__python} setup.py build \
103         --build-base build-2
104 %endif
105
106 %if %{with python2}
107 %{__python3} setup.py build \
108         --build-base build-3
109 %endif
110
111 %install
112 rm -rf $RPM_BUILD_ROOT
113
114 %if %{with python2}
115 %{__python} setup.py \
116         build   --build-base build-2 \
117         install --skip-build \
118                 --optimize=2 \
119                 --root=$RPM_BUILD_ROOT
120
121 %py_postclean
122 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/cryptography/hazmat/bindings/__pycache__/*.c
123 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/cryptography/hazmat/primitives/src/*.[ch]
124 %endif
125
126 %if %{with python3}
127 %{__python3} setup.py \
128         build   --build-base build-3 \
129         install --skip-build \
130                 --optimize=2 \
131                 --root=$RPM_BUILD_ROOT
132
133 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/cryptography/hazmat/primitives/src/*.[ch]
134 %endif
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %if %{with python2}
140 %files
141 %defattr(644,root,root,755)
142 %doc AUTHORS.rst README.rst LICENSE.APACHE LICENSE.BSD
143 %dir %{py_sitedir}/cryptography
144 %attr(755,root,root) %{py_sitedir}/cryptography/_*_cffi_*.so
145 %{py_sitedir}/cryptography/*.py[co]
146 %dir %{py_sitedir}/cryptography/hazmat
147 %{py_sitedir}/cryptography/hazmat/*.py[co]
148 %dir %{py_sitedir}/cryptography/hazmat/backends
149 %{py_sitedir}/cryptography/hazmat/backends/*.py[co]
150 %dir %{py_sitedir}/cryptography/hazmat/backends/commoncrypto
151 %{py_sitedir}/cryptography/hazmat/backends/commoncrypto/*.py[co]
152 %dir %{py_sitedir}/cryptography/hazmat/backends/openssl
153 %{py_sitedir}/cryptography/hazmat/backends/openssl/*.py[co]
154 %dir %{py_sitedir}/cryptography/hazmat/bindings
155 %{py_sitedir}/cryptography/hazmat/bindings/*.py[co]
156 %dir %{py_sitedir}/cryptography/hazmat/bindings/commoncrypto
157 %{py_sitedir}/cryptography/hazmat/bindings/commoncrypto/*.py[co]
158 %dir %{py_sitedir}/cryptography/hazmat/bindings/openssl
159 %{py_sitedir}/cryptography/hazmat/bindings/openssl/*.py[co]
160 %dir %{py_sitedir}/cryptography/hazmat/primitives/interfaces
161 %{py_sitedir}/cryptography/hazmat/primitives/interfaces/*.py[co]
162 %dir %{py_sitedir}/cryptography/hazmat/primitives
163 %{py_sitedir}/cryptography/hazmat/primitives/*.py[co]
164 %dir %{py_sitedir}/cryptography/hazmat/primitives/asymmetric
165 %{py_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py[co]
166 %dir %{py_sitedir}/cryptography/hazmat/primitives/ciphers
167 %{py_sitedir}/cryptography/hazmat/primitives/ciphers/*.py[co]
168 %dir %{py_sitedir}/cryptography/hazmat/primitives/kdf
169 %{py_sitedir}/cryptography/hazmat/primitives/kdf/*.py[co]
170 %dir %{py_sitedir}/cryptography/hazmat/primitives/twofactor
171 %{py_sitedir}/cryptography/hazmat/primitives/twofactor/*.py[co]
172 %{py_sitedir}/cryptography-%{version}-py*.egg-info
173 %endif
174
175 %if %{with python3}
176 %files -n python3-cryptography
177 %defattr(644,root,root,755)
178 %doc AUTHORS.rst README.rst LICENSE.APACHE LICENSE.BSD
179 %dir %{py3_sitedir}/cryptography
180 %attr(755,root,root) %{py3_sitedir}/cryptography/_*_cffi_*.so
181 %{py3_sitedir}/cryptography/*.py
182 %{py3_sitedir}/cryptography/__pycache__
183 %dir %{py3_sitedir}/cryptography/hazmat
184 %{py3_sitedir}/cryptography/hazmat/*.py
185 %{py3_sitedir}/cryptography/hazmat/__pycache__
186 %dir %{py3_sitedir}/cryptography/hazmat/backends
187 %{py3_sitedir}/cryptography/hazmat/backends/*.py
188 %{py3_sitedir}/cryptography/hazmat/backends/__pycache__
189 %dir %{py3_sitedir}/cryptography/hazmat/backends/commoncrypto
190 %{py3_sitedir}/cryptography/hazmat/backends/commoncrypto/*.py
191 %{py3_sitedir}/cryptography/hazmat/backends/commoncrypto/__pycache__
192 %dir %{py3_sitedir}/cryptography/hazmat/backends/openssl
193 %{py3_sitedir}/cryptography/hazmat/backends/openssl/*.py
194 %{py3_sitedir}/cryptography/hazmat/backends/openssl/__pycache__
195 %dir %{py3_sitedir}/cryptography/hazmat/bindings
196 %{py3_sitedir}/cryptography/hazmat/bindings/*.py
197 %{py3_sitedir}/cryptography/hazmat/bindings/__pycache__
198 %dir %{py3_sitedir}/cryptography/hazmat/bindings/commoncrypto
199 %{py3_sitedir}/cryptography/hazmat/bindings/commoncrypto/*.py
200 %{py3_sitedir}/cryptography/hazmat/bindings/commoncrypto/__pycache__
201 %dir %{py3_sitedir}/cryptography/hazmat/bindings/openssl
202 %{py3_sitedir}/cryptography/hazmat/bindings/openssl/*.py
203 %{py3_sitedir}/cryptography/hazmat/bindings/openssl/__pycache__
204 %dir %{py3_sitedir}/cryptography/hazmat/primitives/interfaces
205 %{py3_sitedir}/cryptography/hazmat/primitives/interfaces/*.py
206 %{py3_sitedir}/cryptography/hazmat/primitives/interfaces/__pycache__
207 %dir %{py3_sitedir}/cryptography/hazmat/primitives
208 %{py3_sitedir}/cryptography/hazmat/primitives/*.py
209 %{py3_sitedir}/cryptography/hazmat/primitives/__pycache__
210 %dir %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric
211 %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/*.py
212 %{py3_sitedir}/cryptography/hazmat/primitives/asymmetric/__pycache__
213 %dir %{py3_sitedir}/cryptography/hazmat/primitives/ciphers
214 %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/*.py
215 %{py3_sitedir}/cryptography/hazmat/primitives/ciphers/__pycache__
216 %dir %{py3_sitedir}/cryptography/hazmat/primitives/kdf
217 %{py3_sitedir}/cryptography/hazmat/primitives/kdf/*.py
218 %{py3_sitedir}/cryptography/hazmat/primitives/kdf/__pycache__
219 %dir %{py3_sitedir}/cryptography/hazmat/primitives/twofactor
220 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/*.py
221 %{py3_sitedir}/cryptography/hazmat/primitives/twofactor/__pycache__
222 %{py3_sitedir}/cryptography-%{version}-py*.egg-info
223 %endif
This page took 0.050117 seconds and 2 git commands to generate.