]> git.pld-linux.org Git - packages/python-M2Crypto.git/blame - python-M2Crypto.spec
- rebuild with python 3.8
[packages/python-M2Crypto.git] / python-M2Crypto.spec
CommitLineData
c2789b23
JB
1#
2# Conditional build:
3%bcond_with tests # test target [fails, some files are missing]
1ddc714e
AM
4%bcond_without doc # don't build doc
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8%define module M2Crypto
c2789b23 9
0dc1620e 10Summary: Python interface to OpenSSL
f3256f05 11Summary(pl.UTF-8): Interfejs Pythona do OpenSSL
2917fb4e 12Name: python-M2Crypto
1ddc714e 13Version: 0.30.1
1ccac09c 14Release: 4
db5bbf78 15License: BSD-like
4988ab36 16Group: Libraries/Python
c2789b23 17#Source0Download: https://pypi.python.org/simple/m2crypto/
1ddc714e
AM
18Source0: https://pypi.debian.net/M2Crypto/M2Crypto-%{version}.tar.gz
19# Source0-md5: 7fce3cbf85eb84a669682892b935746b
c8750eea
JB
20Patch0: %{name}-store2ssl.patch
21Patch1: %{name}-swig.patch
085d7304 22URL: https://gitlab.com/m2crypto/m2crypto
c2789b23 23BuildRequires: openssl-devel >= 1.0.1e
1ddc714e 24%if %{with python2}
c8750eea 25BuildRequires: python-devel >= 1:2.6
c2789b23
JB
26BuildRequires: python-modules >= 1:2.6
27BuildRequires: python-setuptools
c2789b23 28%endif
1ddc714e
AM
29%if %{with python3}
30BuildRequires: python3-devel
31BuildRequires: python3-modules
32BuildRequires: python3-setuptools
c2789b23 33%endif
44aff576 34BuildRequires: rpm-pythonprov
cf5fa816 35BuildRequires: rpmbuild(macros) >= 1.710
c8750eea 36BuildRequires: swig-python >= 2.0
8a818010 37BuildRequires: unzip
c2789b23 38Requires: openssl >= 1.0.1e
1ddc714e 39Requires: python-libs
2917fb4e 40BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
2917fb4e 42%description
43M2Crypto makes accessible to the Python programmer the following:
44- DH, RSA, DSA, symmetric ciphers, message digests, HMACs.
45- SSL functionality to implement clients and servers.
46- S/MIME v2.
47
db5bbf78 48M2Crypto is released under a very liberal BSD-like licence. See
2917fb4e 49LICENCE for details.
50
12a04f9d
JR
51%description -l pl.UTF-8
52M2Crypto udostępnia z poziomu Pythona następujące funkcje:
53- DH, RSA, DSA, szyfry symetryczne, skróty, HMAC
54- SSL do implementacji klientów i serwerów
e60c4f73
JB
55- S/MIME v2.
56
c2789b23
JB
57M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w
58pliku LICENCE.
59
1ddc714e
AM
60%package -n python3-%{module}
61Summary: Python interface to OpenSSL
62Summary(pl.UTF-8): Interfejs Pythona do OpenSSL
63Group: Libraries/Python
64Requires: openssl >= 1.0.1
65Requires: python3-libs
66Requires: python3-modules
67
68%description -n python3-%{module}
69M2Crypto makes accessible to the Python programmer the following:
70- DH, RSA, DSA, symmetric ciphers, message digests, HMACs.
71- SSL functionality to implement clients and servers.
72- S/MIME v2.
73
74M2Crypto is released under a very liberal BSD-like licence. See
75LICENCE for details.
76
77%description -n python3-%{module} -l pl.UTF-8
78M2Crypto udostępnia z poziomu Pythona następujące funkcje:
79- DH, RSA, DSA, szyfry symetryczne, skróty, HMAC
80- SSL do implementacji klientów i serwerów
81- S/MIME v2.
82
83M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w
84pliku LICENCE.
85
2917fb4e 86%prep
e03c4abe 87%setup -q -n M2Crypto-%{version}
63fb16de 88%patch0 -p1
60daa667 89%patch1 -p1
8be7ac7c 90
2917fb4e 91%build
1ddc714e 92%if %{with python2}
c2789b23 93%py_build %{?with_tests:test}
1ddc714e
AM
94%endif
95
96%if %{with python3}
97%py3_build %{?with_tests:test}
98%endif
2917fb4e 99
100%install
101rm -rf $RPM_BUILD_ROOT
84c63765 102
1ddc714e 103%if %{with python2}
35ec8f26 104%py_install
4988ab36 105%py_postclean
1ddc714e
AM
106%endif
107
108%if %{with python3}
109%py3_install
110%endif
24ac6e9a 111
2917fb4e 112%clean
113rm -rf $RPM_BUILD_ROOT
114
1ddc714e 115%if %{with python2}
2917fb4e 116%files
117%defattr(644,root,root,755)
c2789b23 118%doc CHANGES LICENCE README.rst
24b30991 119%dir %{py_sitedir}/M2Crypto
cb38e235 120%attr(755,root,root) %{py_sitedir}/M2Crypto/_m2crypto.so
c8750eea 121%{py_sitedir}/M2Crypto/*.py[co]
5d2d2a18 122%dir %{py_sitedir}/M2Crypto/SSL
c8750eea 123%{py_sitedir}/M2Crypto/SSL/*.py[co]
7662b057 124%{py_sitedir}/M2Crypto-*.egg-info
1ddc714e
AM
125%endif
126
127%if %{with python3}
128%files -n python3-%{module}
129%defattr(644,root,root,755)
130%doc CHANGES LICENCE README.rst
131%dir %{py3_sitedir}/%{module}
132%{py3_sitedir}/%{module}/*.py
133%attr(755,root,root) %{py3_sitedir}/%{module}/*.so
134%{py3_sitedir}/%{module}/__pycache__
135%dir %{py3_sitedir}/%{module}/SSL
136%{py3_sitedir}/%{module}/SSL/*.py
137%{py3_sitedir}/%{module}/SSL/__pycache__
138%{py3_sitedir}/%{module}-%{version}-py*.egg-info
139%endif
140
This page took 0.145307 seconds and 4 git commands to generate.