]> git.pld-linux.org Git - packages/python-Crypto.git/blame - python-Crypto.spec
- release 7 (by relup.sh)
[packages/python-Crypto.git] / python-Crypto.spec
CommitLineData
c617610d
JK
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
07b4a17a 7%define module Crypto
09f230db
JB
8Summary: PyCrypto - The Python 2 Cryptography Toolkit
9Summary(pl.UTF-8): Kryptograficzny przybornik dla języka Python 2
38367b30 10Name: python-%{module}
d6fc2a65 11Version: 2.6.1
66922258 12Release: 7
c6500932
ER
13# Mostly Public Domain apart from parts of HMAC.py and setup.py, which are Python
14License: Public Domain and Python
2a726def 15Group: Development/Languages/Python
c6500932 16Source0: http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-%{version}.tar.gz
d6fc2a65 17# Source0-md5: 55a61a054aa66812daf5161a0d5d7eda
c6500932 18URL: http://www.dlitz.net/software/pycrypto/
c617610d 19%if %{with python2}
64524047 20BuildRequires: python
38367b30 21BuildRequires: python-devel >= 2.2
2a726def 22BuildRequires: python-modules
c617610d
JK
23%endif
24%if %{with python3}
25BuildRequires: python3
26BuildRequires: python3-2to3
27BuildRequires: python3-devel
28BuildRequires: python3-modules
29%endif
2a726def 30BuildRequires: rpm-pythonprov
4d2cb92a 31BuildRequires: rpmbuild(macros) >= 1.710
38367b30 32BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
c6500932
ER
34# Don't want provides for python shared objects
35%define _noautoprovfiles %{py_sitedir}/%{module}/.*/.*.so
36
38367b30 37%description
38The Toolkit is a collection of cryptographic algorithms and protocols,
09f230db 39implemented for use from Python 2. Among the contents of the package:
38367b30 40- hash functions: MD2, MD4, RIPEMD
c6500932
ER
41- block encryption algorithms: AES, ARC2, Blowfish, CAST, DES,
42 Triple-DES, IDEA, RC5
38367b30 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
a60620d2
JR
50%description -l pl.UTF-8
51Ten przybornik jest zbiorem kryptograficznych algorytmów i protokołów
09f230db 52zaimplementowanych dla języka Python 2. Pakiet zawiera między innymi:
a60620d2 53- funkcje haszujące: MD2, MD4, RIPEMD
c6500932
ER
54- blokowe algorytmy szyfrujące: AES,ARC2, Blowfish, CAST, DES,
55 Triple-DES, IDEA, RC5
a60620d2 56- strumieniowe algorytmu szyfrujące: ARC4, zwykły XOR
38367b30 57- algorytmy z kluczem publicznym: RSA, DSA,ElGamal, qNEW
a60620d2
JR
58- protokoły: przekształcenia wszystko-albo-nic, chaffing/winnowing
59- inne: RFC1751 moduł do konwersji kluczy 128 bitowych w zbiory słów
38367b30 60 angielskich, test liczb pierwszych
09f230db 61- programy demonstracyjne (aktualnie odrobinę stare i nieaktualne)
38367b30 62
c617610d 63%package -n python3-%{module}
09f230db
JB
64Summary: PyCrypto - The Python 3 Cryptography Toolkit
65Summary(pl.UTF-8): Kryptograficzny przybornik dla języka Python 3
c617610d
JK
66Group: Development/Languages/Python
67
68%description -n python3-%{module}
69The Toolkit is a collection of cryptographic algorithms and protocols,
09f230db 70implemented for use from Python 3. Among the contents of the package:
c617610d
JK
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
82Ten przybornik jest zbiorem kryptograficznych algorytmów i protokołów
09f230db 83zaimplementowanych dla języka Python 3. Pakiet zawiera między innymi:
c617610d
JK
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
09f230db 92- programy demonstracyjne (aktualnie odrobinę stare i nieaktualne)
c617610d 93
38367b30 94%prep
95%setup -q -n pycrypto-%{version}
96
97%build
c617610d 98%if %{with python2}
a4c7ca51 99%py_build %{?with_tests:test}
c617610d
JK
100%endif
101
102%if %{with python3}
a4c7ca51 103%py3_build %{?with_tests:test}
c617610d 104%endif
38367b30 105
106%install
107rm -rf $RPM_BUILD_ROOT
c617610d
JK
108
109%if %{with python2}
a4c7ca51 110%py_install
38367b30 111
c6500932 112%py_postclean
38367b30 113
1470cb3e 114%{__rm} -r $RPM_BUILD_ROOT%{py_sitedir}/Crypto/SelfTest
c617610d
JK
115%endif
116
117%if %{with python3}
a4c7ca51 118%py3_install
c617610d
JK
119
120%{__rm} -r $RPM_BUILD_ROOT%{py3_sitedir}/Crypto/SelfTest
121%endif
5046248c 122
38367b30 123%clean
124rm -rf $RPM_BUILD_ROOT
125
c617610d 126%if %{with python2}
38367b30 127%files
128%defattr(644,root,root,755)
c6500932 129%doc ACKS COPYRIGHT ChangeLog README TODO Doc
38367b30 130%dir %{py_sitedir}/%{module}
131%{py_sitedir}/%{module}/*.py[co]
38367b30 132%dir %{py_sitedir}/%{module}/Cipher
38367b30 133%dir %{py_sitedir}/%{module}/Hash
38367b30 134%dir %{py_sitedir}/%{module}/Protocol
38367b30 135%dir %{py_sitedir}/%{module}/PublicKey
c6500932
ER
136%dir %{py_sitedir}/%{module}/Random
137%dir %{py_sitedir}/%{module}/Random/Fortuna
138%dir %{py_sitedir}/%{module}/Random/OSRNG
a3cc85f4 139%dir %{py_sitedir}/%{module}/Signature
38367b30 140%dir %{py_sitedir}/%{module}/Util
5046248c 141%attr(755,root,root) %{py_sitedir}/%{module}/*/*.so
142%{py_sitedir}/%{module}/*/*.py[co]
c6500932
ER
143%{py_sitedir}/%{module}/*/*/*.py[co]
144%if "%{py_ver}" > "2.4"
145%{py_sitedir}/pycrypto-*.egg-info
146%endif
c617610d
JK
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.132193 seconds and 4 git commands to generate.