From 18c7692885bb7235881b3e54375eeb9bf01c5aafc43150b09983a1eb6e9693b7 Mon Sep 17 00:00:00 2001
From: Denisart Benjamin
Date: Mon, 24 Feb 2014 15:15:49 +0000
Subject: [PATCH 1/4] Accepting request 223704 from
home:mvyskocil:branches:devel:languages:python
- update to 0.8.1
* fixes on Python 3 on OS/X, and some FreeBSD fixes (thanks Tobias)
- added a note wrt disabled tests
- add cffi-pytest-integration.patch: allowinf call pytest from setup.py
- update to 0.8
* integrated support for C99 variable-sized structures
* multi-thread safety
* ffi.getwinerror()
* a number of small fixes
OBS-URL: https://build.opensuse.org/request/show/223704
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=8
---
cffi-0.7.2.tar.gz | 3 --
cffi-0.8.1.tar.gz | 3 ++
cffi-pytest-integration.patch | 42 +++++++++++++++++
cffi-pytest-support-distutils.patch | 71 +++++++++++++++++++++++++++++
python-cffi.changes | 17 +++++++
python-cffi.spec | 19 ++++----
6 files changed, 143 insertions(+), 12 deletions(-)
delete mode 100644 cffi-0.7.2.tar.gz
create mode 100644 cffi-0.8.1.tar.gz
create mode 100644 cffi-pytest-integration.patch
create mode 100644 cffi-pytest-support-distutils.patch
diff --git a/cffi-0.7.2.tar.gz b/cffi-0.7.2.tar.gz
deleted file mode 100644
index 1d68f37..0000000
--- a/cffi-0.7.2.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b723ab49b48c1604e5a3b5e838b0049eaa61e365408a71e40ba0a42d16472042
-size 175579
diff --git a/cffi-0.8.1.tar.gz b/cffi-0.8.1.tar.gz
new file mode 100644
index 0000000..6e4b9bb
--- /dev/null
+++ b/cffi-0.8.1.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:1db1eff2093e31eaaa83b274f8c6d5d2dad2908d43a301185d205e5d256d6818
+size 195206
diff --git a/cffi-pytest-integration.patch b/cffi-pytest-integration.patch
new file mode 100644
index 0000000..b32efdc
--- /dev/null
+++ b/cffi-pytest-integration.patch
@@ -0,0 +1,42 @@
+From: Michal Vyskocil
+Subject: Py.test integration
+
+ ... to allow python setup.py test
+
+---
+ setup.py | 17 ++++++++++++++++-
+ 1 file changed, 16 insertions(+), 1 deletion(-)
+
+Index: cffi-0.8/setup.py
+===================================================================
+--- cffi-0.8.orig/setup.py
++++ cffi-0.8/setup.py
+@@ -2,6 +2,19 @@ import sys, os
+ import subprocess
+ import errno
+
++# http://pytest.org/latest/goodpractises.html
++from setuptools.command.test import test as TestCommand
++
++class PyTest(TestCommand):
++ def finalize_options(self):
++ TestCommand.finalize_options(self)
++ self.test_args = ['testing/', ]
++ self.test_suite = True
++ def run_tests(self):
++ #import here, cause outside the eggs aren't loaded
++ import pytest
++ errno = pytest.main(self.test_args)
++ sys.exit(errno)
+
+ sources = ['c/_cffi_backend.c']
+ libraries = ['ffi']
+@@ -132,5 +145,7 @@ Contact
+
+ install_requires=[
+ 'pycparser',
+- ]
++ ],
++ tests_require=['pytest'],
++ cmdclass = {'test': PyTest},
+ )
diff --git a/cffi-pytest-support-distutils.patch b/cffi-pytest-support-distutils.patch
new file mode 100644
index 0000000..fcfdabb
--- /dev/null
+++ b/cffi-pytest-support-distutils.patch
@@ -0,0 +1,71 @@
+From: Michal Vyskocil
+Subject: Skip distutils tests
+
+ ... when setuptools is installed.
+
+It seems that recent setuptools override distutils, which ends with such errors
+ ext = v.get_extension()
+ > assert 'distutils.extension.Extension' in str(ext.__class__)
+ E assert 'distutils.extension.Extension' in 'setuptools.extension.Extension'
+
+---
+ testing/test_zdistutils.py | 25 +++++++++++--------------
+ 1 file changed, 11 insertions(+), 14 deletions(-)
+
+Index: cffi-0.8/testing/test_zdistutils.py
+===================================================================
+--- cffi-0.8.orig/testing/test_zdistutils.py
++++ cffi-0.8/testing/test_zdistutils.py
+@@ -1,25 +1,22 @@
+ import sys, os, imp, math, shutil
+ import py
++import pytest
+ from cffi import FFI, FFIError
+ from cffi.verifier import Verifier, _locate_engine_class, _get_so_suffixes
+ from cffi.ffiplatform import maybe_relative_path
+ from testing.udir import udir
+
++try:
++ import setuptools
++ del setuptools
++ HAVE_SETUPTOOLS = True
++except ImportError:
++ HAVE_SETUPTOOLS = False
++
+
+ class DistUtilsTest(object):
+
+- def test_locate_engine_class(self):
+- cls = _locate_engine_class(FFI(), self.generic)
+- if self.generic:
+- # asked for the generic engine, which must not generate a
+- # CPython extension module
+- assert not cls._gen_python_module
+- else:
+- # asked for the CPython engine: check that we got it, unless
+- # we are running on top of PyPy, where the generic engine is
+- # always better
+- if '__pypy__' not in sys.builtin_module_names:
+- assert cls._gen_python_module
++ distname = 'distutils' if not HAVE_SETUPTOOLS else 'setuptools'
+
+ def test_write_source(self):
+ ffi = FFI()
+@@ -143,7 +140,7 @@ class DistUtilsTest(object):
+ assert lib.sin(12.3) == math.sin(12.3)
+ v = ffi.verifier
+ ext = v.get_extension()
+- assert 'distutils.extension.Extension' in str(ext.__class__)
++ assert '%s.extension.Extension' % self.distname in str(ext.__class__)
+ assert ext.sources == [maybe_relative_path(v.sourcefilename)]
+ assert ext.name == v.get_module_name()
+ assert ext.define_macros == [('TEST_EXTENSION_OBJECT', '1')]
+@@ -171,7 +168,7 @@ class DistUtilsTest(object):
+ assert lib.test1eoes(7.0) == 42.0
+ v = ffi.verifier
+ ext = v.get_extension()
+- assert 'distutils.extension.Extension' in str(ext.__class__)
++ assert '%s.extension.Extension' % self.distname in str(ext.__class__)
+ assert ext.sources == [maybe_relative_path(v.sourcefilename),
+ extra_source]
+ assert ext.name == v.get_module_name()
diff --git a/python-cffi.changes b/python-cffi.changes
index 69028a1..50e6424 100644
--- a/python-cffi.changes
+++ b/python-cffi.changes
@@ -1,3 +1,20 @@
+-------------------------------------------------------------------
+Mon Feb 24 12:09:15 UTC 2014 - mvyskocil@suse.com
+
+- update to 0.8.1
+ * fixes on Python 3 on OS/X, and some FreeBSD fixes (thanks Tobias)
+- added a note wrt disabled tests
+- add cffi-pytest-integration.patch: allowinf call pytest from setup.py
+
+-------------------------------------------------------------------
+Mon Nov 18 14:33:39 UTC 2013 - mvyskocil@suse.com
+
+- update to 0.8
+ * integrated support for C99 variable-sized structures
+ * multi-thread safety
+ * ffi.getwinerror()
+ * a number of small fixes
+
-------------------------------------------------------------------
Thu Oct 24 10:59:45 UTC 2013 - speilicke@suse.com
diff --git a/python-cffi.spec b/python-cffi.spec
index d1bd7d3..4dc2e28 100644
--- a/python-cffi.spec
+++ b/python-cffi.spec
@@ -1,7 +1,7 @@
#
# spec file for package python-cffi
#
-# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,23 +17,22 @@
Name: python-cffi
-Version: 0.7.2
+Version: 0.8.1
Release: 0
Summary: Foreign Function Interface for Python calling C code
License: MIT
Group: Development/Languages/Python
Url: http://cffi.readthedocs.org
-Source: http://pypi.python.org/packages/source/c/cffi/cffi-%{version}.tar.gz
+Source0: http://pypi.python.org/packages/source/c/cffi/cffi-%{version}.tar.gz
+#PATCH-FOR-UPSTREAM: integration with setuptools, mvyskocil@suse.com
+Patch0: cffi-pytest-integration.patch
BuildRequires: python-devel
BuildRequires: python-setuptools
BuildRequires: pkgconfig(libffi)
# Documentation requirements:
BuildRequires: python-Sphinx
-# Test requirements:
-#BuildRequires: python-nose
-#BuildRequires: python-py
BuildRequires: python-pycparser
-#BuildRequires: python-pytest
+BuildRequires: python-pytest
Requires: python-pycparser
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
@@ -46,6 +45,7 @@ is to provide a convenient and reliable way of calling C code from Python.
%prep
%setup -q -n cffi-%{version}
+%patch0 -p1
%build
CFLAGS="%{optflags}" python setup.py build
@@ -54,8 +54,9 @@ python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-%check
-python setup.py test
+#mvyskocil: some test assume distutils beeing available, fix that later
+#%check
+#python setup.py test
%files
%defattr(-,root,root,-)
From 627dbee2e802f330d83fa18e5647dde3f0a584eefcd682f3e4a15fc209c1a50b Mon Sep 17 00:00:00 2001
From: Sascha Peilicke
Date: Mon, 31 Mar 2014 14:19:07 +0000
Subject: [PATCH 2/4] - Require libffi43-devel on SLE_11_SP2 instead of using
pkg-config to fix build
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=9
---
python-cffi.changes | 5 +++++
python-cffi.spec | 4 +++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/python-cffi.changes b/python-cffi.changes
index 50e6424..f67d945 100644
--- a/python-cffi.changes
+++ b/python-cffi.changes
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Mon Mar 31 14:18:44 UTC 2014 - speilicke@suse.com
+
+- Require libffi43-devel on SLE_11_SP2 instead of using pkg-config to fix build
+
-------------------------------------------------------------------
Mon Feb 24 12:09:15 UTC 2014 - mvyskocil@suse.com
diff --git a/python-cffi.spec b/python-cffi.spec
index 4dc2e28..f9adf79 100644
--- a/python-cffi.spec
+++ b/python-cffi.spec
@@ -28,7 +28,6 @@ Source0: http://pypi.python.org/packages/source/c/cffi/cffi-%{version}.ta
Patch0: cffi-pytest-integration.patch
BuildRequires: python-devel
BuildRequires: python-setuptools
-BuildRequires: pkgconfig(libffi)
# Documentation requirements:
BuildRequires: python-Sphinx
BuildRequires: python-pycparser
@@ -37,6 +36,9 @@ Requires: python-pycparser
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+BuildRequires: libffi43-devel
+%else
+BuildRequires: pkgconfig(libffi)
%endif
%description
From 15e4c2a51ea913d96e4a8035319132b422c756cc2b9bc836a8b7dc2ef4fdc1ee Mon Sep 17 00:00:00 2001
From: Sascha Peilicke
Date: Wed, 2 Apr 2014 08:15:41 +0000
Subject: [PATCH 3/4] OBS-URL:
https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=10
---
cffi-pytest-integration.patch | 42 -----------------
cffi-pytest-support-distutils.patch | 71 -----------------------------
python-cffi.spec | 8 +---
3 files changed, 2 insertions(+), 119 deletions(-)
delete mode 100644 cffi-pytest-integration.patch
delete mode 100644 cffi-pytest-support-distutils.patch
diff --git a/cffi-pytest-integration.patch b/cffi-pytest-integration.patch
deleted file mode 100644
index b32efdc..0000000
--- a/cffi-pytest-integration.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From: Michal Vyskocil
-Subject: Py.test integration
-
- ... to allow python setup.py test
-
----
- setup.py | 17 ++++++++++++++++-
- 1 file changed, 16 insertions(+), 1 deletion(-)
-
-Index: cffi-0.8/setup.py
-===================================================================
---- cffi-0.8.orig/setup.py
-+++ cffi-0.8/setup.py
-@@ -2,6 +2,19 @@ import sys, os
- import subprocess
- import errno
-
-+# http://pytest.org/latest/goodpractises.html
-+from setuptools.command.test import test as TestCommand
-+
-+class PyTest(TestCommand):
-+ def finalize_options(self):
-+ TestCommand.finalize_options(self)
-+ self.test_args = ['testing/', ]
-+ self.test_suite = True
-+ def run_tests(self):
-+ #import here, cause outside the eggs aren't loaded
-+ import pytest
-+ errno = pytest.main(self.test_args)
-+ sys.exit(errno)
-
- sources = ['c/_cffi_backend.c']
- libraries = ['ffi']
-@@ -132,5 +145,7 @@ Contact
-
- install_requires=[
- 'pycparser',
-- ]
-+ ],
-+ tests_require=['pytest'],
-+ cmdclass = {'test': PyTest},
- )
diff --git a/cffi-pytest-support-distutils.patch b/cffi-pytest-support-distutils.patch
deleted file mode 100644
index fcfdabb..0000000
--- a/cffi-pytest-support-distutils.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From: Michal Vyskocil
-Subject: Skip distutils tests
-
- ... when setuptools is installed.
-
-It seems that recent setuptools override distutils, which ends with such errors
- ext = v.get_extension()
- > assert 'distutils.extension.Extension' in str(ext.__class__)
- E assert 'distutils.extension.Extension' in 'setuptools.extension.Extension'
-
----
- testing/test_zdistutils.py | 25 +++++++++++--------------
- 1 file changed, 11 insertions(+), 14 deletions(-)
-
-Index: cffi-0.8/testing/test_zdistutils.py
-===================================================================
---- cffi-0.8.orig/testing/test_zdistutils.py
-+++ cffi-0.8/testing/test_zdistutils.py
-@@ -1,25 +1,22 @@
- import sys, os, imp, math, shutil
- import py
-+import pytest
- from cffi import FFI, FFIError
- from cffi.verifier import Verifier, _locate_engine_class, _get_so_suffixes
- from cffi.ffiplatform import maybe_relative_path
- from testing.udir import udir
-
-+try:
-+ import setuptools
-+ del setuptools
-+ HAVE_SETUPTOOLS = True
-+except ImportError:
-+ HAVE_SETUPTOOLS = False
-+
-
- class DistUtilsTest(object):
-
-- def test_locate_engine_class(self):
-- cls = _locate_engine_class(FFI(), self.generic)
-- if self.generic:
-- # asked for the generic engine, which must not generate a
-- # CPython extension module
-- assert not cls._gen_python_module
-- else:
-- # asked for the CPython engine: check that we got it, unless
-- # we are running on top of PyPy, where the generic engine is
-- # always better
-- if '__pypy__' not in sys.builtin_module_names:
-- assert cls._gen_python_module
-+ distname = 'distutils' if not HAVE_SETUPTOOLS else 'setuptools'
-
- def test_write_source(self):
- ffi = FFI()
-@@ -143,7 +140,7 @@ class DistUtilsTest(object):
- assert lib.sin(12.3) == math.sin(12.3)
- v = ffi.verifier
- ext = v.get_extension()
-- assert 'distutils.extension.Extension' in str(ext.__class__)
-+ assert '%s.extension.Extension' % self.distname in str(ext.__class__)
- assert ext.sources == [maybe_relative_path(v.sourcefilename)]
- assert ext.name == v.get_module_name()
- assert ext.define_macros == [('TEST_EXTENSION_OBJECT', '1')]
-@@ -171,7 +168,7 @@ class DistUtilsTest(object):
- assert lib.test1eoes(7.0) == 42.0
- v = ffi.verifier
- ext = v.get_extension()
-- assert 'distutils.extension.Extension' in str(ext.__class__)
-+ assert '%s.extension.Extension' % self.distname in str(ext.__class__)
- assert ext.sources == [maybe_relative_path(v.sourcefilename),
- extra_source]
- assert ext.name == v.get_module_name()
diff --git a/python-cffi.spec b/python-cffi.spec
index f9adf79..5ee99bc 100644
--- a/python-cffi.spec
+++ b/python-cffi.spec
@@ -24,8 +24,6 @@ License: MIT
Group: Development/Languages/Python
Url: http://cffi.readthedocs.org
Source0: http://pypi.python.org/packages/source/c/cffi/cffi-%{version}.tar.gz
-#PATCH-FOR-UPSTREAM: integration with setuptools, mvyskocil@suse.com
-Patch0: cffi-pytest-integration.patch
BuildRequires: python-devel
BuildRequires: python-setuptools
# Documentation requirements:
@@ -47,7 +45,6 @@ is to provide a convenient and reliable way of calling C code from Python.
%prep
%setup -q -n cffi-%{version}
-%patch0 -p1
%build
CFLAGS="%{optflags}" python setup.py build
@@ -56,9 +53,8 @@ python setup.py build_sphinx && rm build/sphinx/html/.buildinfo
%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
-#mvyskocil: some test assume distutils beeing available, fix that later
-#%check
-#python setup.py test
+%check
+PYTHONPATH=%{buildroot}%{python_sitearch} py.test
%files
%defattr(-,root,root,-)
From 6dc6094763fef90181b5b5eef73ca80ce44f5cec81c124dc9644c47cfdfa185a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?=
Date: Wed, 28 May 2014 08:38:49 +0000
Subject: [PATCH 4/4] Accepting request 234745 from
home:matejcik:branches:devel:languages:python
- update to 0.8.2
* minor bugfixes
- remove cffi-pytest-integration.patch as it is no longer necessary
OBS-URL: https://build.opensuse.org/request/show/234745
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cffi?expand=0&rev=11
---
cffi-0.8.1.tar.gz | 3 ---
cffi-0.8.2.tar.gz | 3 +++
python-cffi.changes | 7 +++++++
python-cffi.spec | 2 +-
4 files changed, 11 insertions(+), 4 deletions(-)
delete mode 100644 cffi-0.8.1.tar.gz
create mode 100644 cffi-0.8.2.tar.gz
diff --git a/cffi-0.8.1.tar.gz b/cffi-0.8.1.tar.gz
deleted file mode 100644
index 6e4b9bb..0000000
--- a/cffi-0.8.1.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:1db1eff2093e31eaaa83b274f8c6d5d2dad2908d43a301185d205e5d256d6818
-size 195206
diff --git a/cffi-0.8.2.tar.gz b/cffi-0.8.2.tar.gz
new file mode 100644
index 0000000..0cf61c1
--- /dev/null
+++ b/cffi-0.8.2.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:8192393640f7bc304ce82669b35eb90592566a30abbb4924456f52079afc18e2
+size 197622
diff --git a/python-cffi.changes b/python-cffi.changes
index f67d945..895d90b 100644
--- a/python-cffi.changes
+++ b/python-cffi.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Mon May 19 16:35:30 UTC 2014 - jmatejek@suse.com
+
+- update to 0.8.2
+ * minor bugfixes
+- remove cffi-pytest-integration.patch as it is no longer necessary
+
-------------------------------------------------------------------
Mon Mar 31 14:18:44 UTC 2014 - speilicke@suse.com
diff --git a/python-cffi.spec b/python-cffi.spec
index 5ee99bc..4bb8bed 100644
--- a/python-cffi.spec
+++ b/python-cffi.spec
@@ -17,7 +17,7 @@
Name: python-cffi
-Version: 0.8.1
+Version: 0.8.2
Release: 0
Summary: Foreign Function Interface for Python calling C code
License: MIT