- 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
43 lines
1.1 KiB
Diff
43 lines
1.1 KiB
Diff
From: Michal Vyskocil <mvyskocil@suse.com>
|
|
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},
|
|
)
|