3 %bcond_with tests # test target [fails, some files are missing]
4 %bcond_without doc # don't build doc
5 %bcond_without python2 # CPython 2.x module
6 %bcond_without python3 # CPython 3.x module
8 %define module M2Crypto
10 Summary: Python interface to OpenSSL
11 Summary(pl.UTF-8): Interfejs Pythona do OpenSSL
16 Group: Libraries/Python
17 #Source0Download: https://pypi.python.org/simple/m2crypto/
18 Source0: https://pypi.debian.net/M2Crypto/M2Crypto-%{version}.tar.gz
19 # Source0-md5: 8f39bfac730b6567e0c2179d15318c60
20 URL: https://gitlab.com/m2crypto/m2crypto
21 BuildRequires: openssl-devel >= 1.0.1e
23 BuildRequires: python-devel >= 1:2.6
24 BuildRequires: python-modules >= 1:2.6
25 BuildRequires: python-setuptools
28 BuildRequires: python3-devel
29 BuildRequires: python3-modules
30 BuildRequires: python3-setuptools
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.710
34 BuildRequires: swig-python >= 2.0
36 Requires: openssl >= 1.0.1e
38 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41 M2Crypto makes accessible to the Python programmer the following:
42 - DH, RSA, DSA, symmetric ciphers, message digests, HMACs.
43 - SSL functionality to implement clients and servers.
46 M2Crypto is released under a very liberal BSD-like licence. See
49 %description -l pl.UTF-8
50 M2Crypto udostępnia z poziomu Pythona następujące funkcje:
51 - DH, RSA, DSA, szyfry symetryczne, skróty, HMAC
52 - SSL do implementacji klientów i serwerów
55 M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w
58 %package -n python3-%{module}
59 Summary: Python interface to OpenSSL
60 Summary(pl.UTF-8): Interfejs Pythona do OpenSSL
61 Group: Libraries/Python
62 Requires: openssl >= 1.0.1
63 Requires: python3-libs
64 Requires: python3-modules
66 %description -n python3-%{module}
67 M2Crypto makes accessible to the Python programmer the following:
68 - DH, RSA, DSA, symmetric ciphers, message digests, HMACs.
69 - SSL functionality to implement clients and servers.
72 M2Crypto is released under a very liberal BSD-like licence. See
75 %description -n python3-%{module} -l pl.UTF-8
76 M2Crypto udostępnia z poziomu Pythona następujące funkcje:
77 - DH, RSA, DSA, szyfry symetryczne, skróty, HMAC
78 - SSL do implementacji klientów i serwerów
81 M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w
85 %setup -q -n M2Crypto-%{version}
89 %py_build %{?with_tests:test}
93 %py3_build %{?with_tests:test}
97 rm -rf $RPM_BUILD_ROOT
109 rm -rf $RPM_BUILD_ROOT
113 %defattr(644,root,root,755)
114 %doc CHANGES LICENCE README.rst
115 %dir %{py_sitedir}/M2Crypto
116 %attr(755,root,root) %{py_sitedir}/M2Crypto/_m2crypto.so
117 %{py_sitedir}/M2Crypto/*.py[co]
118 %dir %{py_sitedir}/M2Crypto/SSL
119 %{py_sitedir}/M2Crypto/SSL/*.py[co]
120 %{py_sitedir}/M2Crypto-*.egg-info
124 %files -n python3-%{module}
125 %defattr(644,root,root,755)
126 %doc CHANGES LICENCE README.rst
127 %dir %{py3_sitedir}/%{module}
128 %{py3_sitedir}/%{module}/*.py
129 %attr(755,root,root) %{py3_sitedir}/%{module}/*.so
130 %{py3_sitedir}/%{module}/__pycache__
131 %dir %{py3_sitedir}/%{module}/SSL
132 %{py3_sitedir}/%{module}/SSL/*.py
133 %{py3_sitedir}/%{module}/SSL/__pycache__
134 %{py3_sitedir}/%{module}-%{version}-py*.egg-info