]> git.pld-linux.org Git - packages/python-M2Crypto.git/blob - python-M2Crypto.spec
- release 3 (by relup.sh)
[packages/python-M2Crypto.git] / python-M2Crypto.spec
1 #
2 # Conditional build:
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
7
8 %define module  M2Crypto
9
10 Summary:        Python interface to OpenSSL
11 Summary(pl.UTF-8):      Interfejs Pythona do OpenSSL
12 Name:           python-M2Crypto
13 Version:        0.30.1
14 Release:        3
15 License:        BSD-like
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:  7fce3cbf85eb84a669682892b935746b
20 Patch0:         %{name}-store2ssl.patch
21 Patch1:         %{name}-swig.patch
22 URL:            https://gitlab.com/m2crypto/m2crypto
23 BuildRequires:  openssl-devel >= 1.0.1e
24 %if %{with python2}
25 BuildRequires:  python-devel >= 1:2.6
26 BuildRequires:  python-modules >= 1:2.6
27 BuildRequires:  python-setuptools
28 %endif
29 %if %{with python3}
30 BuildRequires:  python3-devel
31 BuildRequires:  python3-modules
32 BuildRequires:  python3-setuptools
33 %endif
34 BuildRequires:  rpm-pythonprov
35 BuildRequires:  rpmbuild(macros) >= 1.710
36 BuildRequires:  swig-python >= 2.0
37 BuildRequires:  unzip
38 Requires:       openssl >= 1.0.1e
39 Requires:       python-libs
40 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
41
42 %description
43 M2Crypto 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
48 M2Crypto is released under a very liberal BSD-like licence. See
49 LICENCE for details.
50
51 %description -l pl.UTF-8
52 M2Crypto 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
55 - S/MIME v2.
56
57 M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w
58 pliku LICENCE.
59
60 %package -n python3-%{module}
61 Summary:        Python interface to OpenSSL
62 Summary(pl.UTF-8):      Interfejs Pythona do OpenSSL
63 Group:          Libraries/Python
64 Requires:       openssl >= 1.0.1
65 Requires:       python3-libs
66 Requires:       python3-modules
67
68 %description -n python3-%{module}
69 M2Crypto 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
74 M2Crypto is released under a very liberal BSD-like licence. See
75 LICENCE for details.
76
77 %description -n python3-%{module} -l pl.UTF-8
78 M2Crypto 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
83 M2Crypto jest wydane na bardzo liberalnej licencji BSD - szczegóły w
84 pliku LICENCE.
85
86 %prep
87 %setup -q -n M2Crypto-%{version}
88 %patch0 -p1
89 %patch1 -p1
90
91 %build
92 %if %{with python2}
93 %py_build %{?with_tests:test}
94 %endif
95
96 %if %{with python3}
97 %py3_build %{?with_tests:test}
98 %endif
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %py_install
105 %py_postclean
106 %endif
107
108 %if %{with python3}
109 %py3_install
110 %endif
111
112 %clean
113 rm -rf $RPM_BUILD_ROOT
114
115 %if %{with python2}
116 %files
117 %defattr(644,root,root,755)
118 %doc CHANGES LICENCE README.rst
119 %dir %{py_sitedir}/M2Crypto
120 %attr(755,root,root) %{py_sitedir}/M2Crypto/_m2crypto.so
121 %{py_sitedir}/M2Crypto/*.py[co]
122 %dir %{py_sitedir}/M2Crypto/SSL
123 %{py_sitedir}/M2Crypto/SSL/*.py[co]
124 %{py_sitedir}/M2Crypto-*.egg-info
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.093833 seconds and 3 git commands to generate.