]> git.pld-linux.org Git - packages/python-Crypto.git/blob - python-Crypto.spec
927273334c1338729ff84d0dcc83e5aef722e08e
[packages/python-Crypto.git] / python-Crypto.spec
1
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  Crypto
8 Summary:        PyCrypto - The Python 2 Cryptography Toolkit
9 Summary(pl.UTF-8):      Kryptograficzny przybornik dla języka Python 2
10 Name:           python-%{module}
11 Version:        2.6.1
12 Release:        6
13 # Mostly Public Domain apart from parts of HMAC.py and setup.py, which are Python
14 License:        Public Domain and Python
15 Group:          Development/Languages/Python
16 Source0:        http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-%{version}.tar.gz
17 # Source0-md5:  55a61a054aa66812daf5161a0d5d7eda
18 URL:            http://www.dlitz.net/software/pycrypto/
19 %if %{with python2}
20 BuildRequires:  python
21 BuildRequires:  python-devel >= 2.2
22 BuildRequires:  python-modules
23 %endif
24 %if %{with python3}
25 BuildRequires:  python3
26 BuildRequires:  python3-2to3
27 BuildRequires:  python3-devel
28 BuildRequires:  python3-modules
29 %endif
30 BuildRequires:  rpm-pythonprov
31 BuildRequires:  rpmbuild(macros) >= 1.710
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 # Don't want provides for python shared objects
35 %define         _noautoprovfiles        %{py_sitedir}/%{module}/.*/.*.so
36
37 %description
38 The Toolkit is a collection of cryptographic algorithms and protocols,
39 implemented for use from Python 2. Among the contents of the package:
40 - hash functions: MD2, MD4, RIPEMD
41 - block encryption algorithms: AES, ARC2, Blowfish, CAST, DES,
42   Triple-DES, IDEA, RC5
43 - stream encryption algorithms: ARC4, simple XOR
44 - public-key algorithms: RSA, DSA, ElGamal, qNEW
45 - protocols: All-or-nothing transforms, chaffing/winnowing
46 - miscellaneous: RFC1751 module for converting 128-key keys into a set
47   of English words, primality testing
48 - some demo programs (currently all quite old and outdated)
49
50 %description -l pl.UTF-8
51 Ten przybornik jest zbiorem kryptograficznych algorytmów i protokołów
52 zaimplementowanych dla języka Python 2. Pakiet zawiera między innymi:
53 - funkcje haszujące: MD2, MD4, RIPEMD
54 - blokowe algorytmy szyfrujące: AES,ARC2, Blowfish, CAST, DES,
55   Triple-DES, IDEA, RC5
56 - strumieniowe algorytmu szyfrujące: ARC4, zwykły XOR
57 - algorytmy z kluczem publicznym: RSA, DSA,ElGamal, qNEW
58 - protokoły: przekształcenia wszystko-albo-nic, chaffing/winnowing
59 - inne: RFC1751 moduł do konwersji kluczy 128 bitowych w zbiory słów
60   angielskich, test liczb pierwszych
61 - programy demonstracyjne (aktualnie odrobinę stare i nieaktualne)
62
63 %package -n python3-%{module}
64 Summary:        PyCrypto - The Python 3 Cryptography Toolkit
65 Summary(pl.UTF-8):      Kryptograficzny przybornik dla języka Python 3
66 Group:          Development/Languages/Python
67
68 %description -n python3-%{module}
69 The Toolkit is a collection of cryptographic algorithms and protocols,
70 implemented for use from Python 3. Among the contents of the package:
71 - hash functions: MD2, MD4, RIPEMD
72 - block encryption algorithms: AES, ARC2, Blowfish, CAST, DES,
73   Triple-DES, IDEA, RC5
74 - stream encryption algorithms: ARC4, simple XOR
75 - public-key algorithms: RSA, DSA, ElGamal, qNEW
76 - protocols: All-or-nothing transforms, chaffing/winnowing
77 - miscellaneous: RFC1751 module for converting 128-key keys into a set
78   of English words, primality testing
79 - some demo programs (currently all quite old and outdated)
80
81 %description -n python3-%{module} -l pl.UTF-8
82 Ten przybornik jest zbiorem kryptograficznych algorytmów i protokołów
83 zaimplementowanych dla języka Python 3. Pakiet zawiera między innymi:
84 - funkcje haszujące: MD2, MD4, RIPEMD
85 - blokowe algorytmy szyfrujące: AES,ARC2, Blowfish, CAST, DES,
86   Triple-DES, IDEA, RC5
87 - strumieniowe algorytmu szyfrujące: ARC4, zwykły XOR
88 - algorytmy z kluczem publicznym: RSA, DSA,ElGamal, qNEW
89 - protokoły: przekształcenia wszystko-albo-nic, chaffing/winnowing
90 - inne: RFC1751 moduł do konwersji kluczy 128 bitowych w zbiory słów
91   angielskich, test liczb pierwszych
92 - programy demonstracyjne (aktualnie odrobinę stare i nieaktualne)
93
94 %prep
95 %setup -q -n pycrypto-%{version}
96
97 %build
98 %if %{with python2}
99 %py_build %{?with_tests:test}
100 %endif
101
102 %if %{with python3}
103 %py3_build %{?with_tests:test}
104 %endif
105
106 %install
107 rm -rf $RPM_BUILD_ROOT
108
109 %if %{with python2}
110 %py_install
111
112 %py_postclean
113
114 %{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/Crypto/SelfTest
115 %endif
116
117 %if %{with python3}
118 %py3_install
119
120 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/Crypto/SelfTest
121 %endif
122
123 %clean
124 rm -rf $RPM_BUILD_ROOT
125
126 %if %{with python2}
127 %files
128 %defattr(644,root,root,755)
129 %doc ACKS COPYRIGHT ChangeLog README TODO Doc
130 %dir %{py_sitedir}/%{module}
131 %{py_sitedir}/%{module}/*.py[co]
132 %dir %{py_sitedir}/%{module}/Cipher
133 %dir %{py_sitedir}/%{module}/Hash
134 %dir %{py_sitedir}/%{module}/Protocol
135 %dir %{py_sitedir}/%{module}/PublicKey
136 %dir %{py_sitedir}/%{module}/Random
137 %dir %{py_sitedir}/%{module}/Random/Fortuna
138 %dir %{py_sitedir}/%{module}/Random/OSRNG
139 %dir %{py_sitedir}/%{module}/Signature
140 %dir %{py_sitedir}/%{module}/Util
141 %attr(755,root,root) %{py_sitedir}/%{module}/*/*.so
142 %{py_sitedir}/%{module}/*/*.py[co]
143 %{py_sitedir}/%{module}/*/*/*.py[co]
144 %if "%{py_ver}" > "2.4"
145 %{py_sitedir}/pycrypto-*.egg-info
146 %endif
147 %endif
148
149 %if %{with python3}
150 %files -n python3-%{module}
151 %defattr(644,root,root,755)
152 %doc ACKS COPYRIGHT ChangeLog README TODO Doc
153 %dir %{py3_sitedir}/%{module}
154 %{py3_sitedir}/%{module}/*.py
155 %{py3_sitedir}/%{module}/__pycache__
156 %dir %{py3_sitedir}/%{module}/Cipher
157 %dir %{py3_sitedir}/%{module}/Hash
158 %dir %{py3_sitedir}/%{module}/Protocol
159 %dir %{py3_sitedir}/%{module}/PublicKey
160 %dir %{py3_sitedir}/%{module}/Random
161 %dir %{py3_sitedir}/%{module}/Random/Fortuna
162 %dir %{py3_sitedir}/%{module}/Random/OSRNG
163 %dir %{py3_sitedir}/%{module}/Signature
164 %dir %{py3_sitedir}/%{module}/Util
165 %attr(755,root,root) %{py3_sitedir}/%{module}/*/*.so
166 %{py3_sitedir}/%{module}/*/*.py
167 %{py3_sitedir}/%{module}/*/__pycache__
168 %{py3_sitedir}/%{module}/*/*/*.py
169 %{py3_sitedir}/%{module}/*/*/__pycache__
170 %{py3_sitedir}/pycrypto-*.egg-info
171 %endif
This page took 0.089304 seconds and 2 git commands to generate.