Summary: Python interface to OpenSSL
-Summary(pl.UTF-8): Interfejs Pythona do OpenSSL
+Summary(pl.UTF-8): Interfejs Pythona do OpenSSL
Name: python-M2Crypto
-Version: 0.17
-Release: 1
+Version: 0.22.5
+Release: 2
License: BSD-like
-Group: Development/Languages/Python
-Source0: http://wiki.osafoundation.org/pub/Projects/MeTooCrypto/m2crypto-%{version}.tar.gz
-# Source0-md5: c67b45c752fd5e8115cd6b14831c5a38
-Patch0: %{name}-swig_sources.patch
-Patch1: %{name}-store2ssl.patch
-URL: http://wiki.osafoundation.org/bin/view/Projects/MeTooCrypto
-BuildRequires: openssl-devel >= 0.9.7d
-BuildRequires: python-devel >= 1:2.5
-BuildRequires: swig-python >= 1.3.24
+Group: Libraries/Python
+Source0: https://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-%{version}.tar.gz
+# Source0-md5: f84eb07aa1687f39bc26ee7b1ba5a105
+Patch0: %{name}-store2ssl.patch
+Patch1: %{name}-swig.patch
+URL: https://gitlab.com/m2crypto/m2crypto
+BuildRequires: openssl-devel >= 0.9.8
+BuildRequires: python-devel >= 1:2.6
+BuildRequires: python-modules
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.710
+BuildRequires: swig-python >= 2.0
BuildRequires: unzip
%pyrequires_eq python
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
- S/MIME v2.
%prep
-%setup -q -n m2crypto-%{version}
+%setup -q -n M2Crypto-%{version}
%patch0 -p1
%patch1 -p1
-find demo -type d -name CVS | xargs rm -rf
-
%build
-python setup.py build
+%py_build
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{py_sitedir}
+install -d $RPM_BUILD_ROOT{%{py_sitedir},%{_examplesdir}/%{name}-%{version}}
-python setup.py install \
- --root=$RPM_BUILD_ROOT \
- --optimize=2
+%py_install
-# shutup check-files
-find $RPM_BUILD_ROOT%{py_sitedir} -name \*.py \
- -exec rm {} \;
+%py_postclean
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc CHANGES LICENCE README doc/*.html demo
+%doc README
%dir %{py_sitedir}/M2Crypto
%attr(755,root,root) %{py_sitedir}/M2Crypto/*.so
-%{py_sitedir}/M2Crypto/*.py[oc]
-%dir %{py_sitedir}/M2Crypto/SSL
-%{py_sitedir}/M2Crypto/SSL/*.py[oc]
+%{py_sitedir}/M2Crypto/*.py[co]
%dir %{py_sitedir}/M2Crypto/PGP
-%{py_sitedir}/M2Crypto/PGP/*.py[oc]
+%{py_sitedir}/M2Crypto/PGP/*.py[co]
+%dir %{py_sitedir}/M2Crypto/SSL
+%{py_sitedir}/M2Crypto/SSL/*.py[co]
%{py_sitedir}/M2Crypto-*.egg-info