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