Accepting request 575393 from devel:languages:python

- Update to 0.28.2:
  * Fix ppc builds

- Enable tests, fix docu install phase

- Removed obsolete patches fix-build-python3.diff
  and fix-openssl-include-path.diff
- Update to 0.28.1
  * compability with Python 3
  * building on Mac OS X should be now more reliable and automagic
  * Fix licence in metadata: it is MIT, not BSD
  * Fix and add tests for SWIG/_aes.i module
  * Bundle-in unittest2 for Python 2.6
  * Remove all PGP modules

OBS-URL: https://build.opensuse.org/request/show/575393
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-M2Crypto?expand=0&rev=26
This commit is contained in:
Dominique Leuenberger 2018-02-12 09:12:26 +00:00 committed by Git OBS Bridge
commit 750f057336
6 changed files with 34 additions and 53 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:82317459d653322d6b37f122ce916dc91ddcd9d1b814847497ac796c4549dd68
size 1119288

3
M2Crypto-0.28.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f4dfa7a77f983444e64f7b81f946bdfc1b05bc92b1aeca0775be8742aa939c3f
size 1268506

View File

@ -1,16 +0,0 @@
Index: M2Crypto-0.27.0/setup.py
===================================================================
--- M2Crypto-0.27.0.orig/setup.py
+++ M2Crypto-0.27.0/setup.py
@@ -48,7 +48,10 @@ def _get_additional_includes():
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
_, err = pid.communicate()
- err = [line.lstrip() for line in err.split('\n') if line and line[0] == ' ']
+ if sys.version_info[0] == 2:
+ err = [line.lstrip() for line in err.split('\n') if line and line[0] == ' ']
+ else:
+ err = [line.lstrip() for line in err.split(b'\n') if line and line[0] == b' ']
return err

View File

@ -1,13 +0,0 @@
Index: M2Crypto-0.27.0/setup.py
===================================================================
--- M2Crypto-0.27.0.orig/setup.py
+++ M2Crypto-0.27.0/setup.py
@@ -159,7 +164,7 @@ class _M2CryptoBuildExt(build_ext.build_
if platform.system() == "Linux":
self.include_dirs += _get_additional_includes()
- inc_openssl_dir = '/usr/include/openssl'
+ inc_openssl_dir = '/usr/include/'
if inc_openssl_dir not in self.include_dirs:
self.include_dirs.append(inc_openssl_dir)
log.debug('self.include_dirs = %s', self.include_dirs)

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Fri Feb 9 22:30:59 UTC 2018 - michael@stroeder.com
- Update to 0.28.2:
* Fix ppc builds
-------------------------------------------------------------------
Fri Feb 9 09:56:10 UTC 2018 - tchvatal@suse.com
- Enable tests, fix docu install phase
-------------------------------------------------------------------
Thu Feb 8 18:57:19 UTC 2018 - michael@stroeder.com
- Removed obsolete patches fix-build-python3.diff
and fix-openssl-include-path.diff
- Update to 0.28.1
* compability with Python 3
* building on Mac OS X should be now more reliable and automagic
* Fix licence in metadata: it is MIT, not BSD
* Fix and add tests for SWIG/_aes.i module
* Bundle-in unittest2 for Python 2.6
* Remove all PGP modules
-------------------------------------------------------------------
Wed Nov 8 18:13:06 UTC 2017 - jmatejek@suse.com

View File

@ -1,7 +1,7 @@
#
# spec file for package python-M2Crypto
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,24 +16,16 @@
#
# Tests don't work offline
%bcond_with tests
%define oldpython python
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-M2Crypto
Version: 0.27.0
Version: 0.28.2
Release: 0
Url: https://gitlab.com/m2crypto/m2crypto
Summary: Crypto and SSL toolkit for Python
License: MIT
Group: Development/Languages/Python
Source: https://pypi.io/packages/source/M/M2Crypto/M2Crypto-%{version}.tar.gz
# PATCH-FIX-UPSTREAM fix-build-python3.diff -- Fixes a str/bytes issue when building with python3
Patch0: fix-build-python3.diff
# PATCH-FIX-OPENSUSE fix-openssl-include-path.diff -- Fixes include path for openssl
Patch1: fix-openssl-include-path.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: https://gitlab.com/m2crypto/m2crypto
Source: https://files.pythonhosted.org/packages/source/M/M2Crypto/M2Crypto-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module typing}
@ -41,13 +33,13 @@ BuildRequires: fdupes
BuildRequires: openssl
BuildRequires: openssl-devel
BuildRequires: python-rpm-macros
Requires: python-typing
# hpj: SLES 12 and Leap 42.1 need swig3 to build this package
%if 0%{?sle_version} == 120100
BuildRequires: swig3
%else
BuildRequires: swig
%endif
Requires: python-typing
%ifpython2
Provides: %{oldpython}-m2crypto = %{version}
Obsoletes: %{oldpython}-m2crypto < %{version}
@ -67,8 +59,8 @@ messenger for Zope.
%package -n %{name}-doc
Summary: Documentation for the Crypto and SSL toolkit for Python
Group: Development/Libraries/Python
BuildArch: noarch
Requires: %{name} = %{version}
BuildArch: noarch
%description -n %{name}-doc
M2Crypto is a crypto and SSL toolkit for Python featuring the following:
@ -84,8 +76,6 @@ Documentation for the Crypto and SSL toolkit for Python
%prep
%setup -q -n M2Crypto-%{version}
%patch0 -p1
%patch1 -p1
%build
export CFLAGS="%{optflags}"
@ -95,18 +85,14 @@ export CFLAGS="%{optflags}"
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%if %{with tests}
%check
%python_exec setup.py test
%endif
%files %{python_files}
%defattr(-,root,root)
%doc CHANGES LICENCE README.rst
%{python_sitearch}/*
%files -n %{name}-doc
%defattr(-,root,root)
%doc doc/*
%doc doc/*.rst
%changelog