guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: python-cffi: Fix test failure on i686.


From: Marius Bakke
Subject: 01/01: gnu: python-cffi: Fix test failure on i686.
Date: Sun, 11 Nov 2018 19:20:05 -0500 (EST)

mbakke pushed a commit to branch core-updates
in repository guix.

commit 8c5749f1b5255e37a6ef7b43e48fe0bbc57ce209
Author: Marius Bakke <address@hidden>
Date:   Sun Nov 11 16:59:53 2018 +0100

    gnu: python-cffi: Fix test failure on i686.
    
    * gnu/packages/patches/python-cffi-x87-stack-clean.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/libffi.scm (python-cffi)[source](patches): Add it.
---
 gnu/local.mk                                       |  1 +
 gnu/packages/libffi.scm                            |  3 ++-
 .../patches/python-cffi-x87-stack-clean.patch      | 29 ++++++++++++++++++++++
 3 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 31dafdd..3e355ac 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1078,6 +1078,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/python-CVE-2018-14647.patch             \
   %D%/packages/patches/python-axolotl-AES-fix.patch            \
   %D%/packages/patches/python-cairocffi-dlopen-path.patch      \
+  %D%/packages/patches/python-cffi-x87-stack-clean.patch       \
   %D%/packages/patches/python-fix-tests.patch                  \
   %D%/packages/patches/python2-larch-coverage-4.0a6-compatibility.patch \
   %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \
diff --git a/gnu/packages/libffi.scm b/gnu/packages/libffi.scm
index d1b910b..01a5ea2 100644
--- a/gnu/packages/libffi.scm
+++ b/gnu/packages/libffi.scm
@@ -88,7 +88,8 @@ conversions for values passed between the two languages.")
       (method url-fetch)
       (uri (pypi-uri "cffi" version))
       (sha256
-       (base32 "1x3lrj928dcxx1k8k9gf3s4s3jwvzv8mc3kkyg1g7c3a1sc1f3z9"))))
+       (base32 "1x3lrj928dcxx1k8k9gf3s4s3jwvzv8mc3kkyg1g7c3a1sc1f3z9"))
+      (patches (search-patches "python-cffi-x87-stack-clean.patch"))))
     (build-system python-build-system)
     (outputs '("out" "doc"))
     (inputs
diff --git a/gnu/packages/patches/python-cffi-x87-stack-clean.patch 
b/gnu/packages/patches/python-cffi-x87-stack-clean.patch
new file mode 100644
index 0000000..5024350
--- /dev/null
+++ b/gnu/packages/patches/python-cffi-x87-stack-clean.patch
@@ -0,0 +1,29 @@
+Fix test that fails on i686:
+
+https://bitbucket.org/cffi/cffi/issues/382
+
+This is a squashed version of these commits:
+https://bitbucket.org/cffi/cffi/commits/ef09637b2314
+https://bitbucket.org/cffi/cffi/commits/7a76a3815340
+
+diff -r 99940f1f5402 testing/cffi0/test_function.py
+--- a/testing/cffi0/test_function.py   Tue Feb 27 21:18:33 2018 +0100
++++ b/testing/cffi0/test_function.py   Sun Nov 11 16:26:23 2018 +0100
+@@ -45,14 +45,14 @@
+         assert x != math.sin(1.23)    # rounding effects
+         assert abs(x - math.sin(1.23)) < 1E-6
+ 
+-    def test_sin_no_return_value(self):
++    def test_lround_no_return_value(self):
+         # check that 'void'-returning functions work too
+         ffi = FFI(backend=self.Backend())
+         ffi.cdef("""
+-            void sin(double x);
++            void lround(double x);
+         """)
+         m = ffi.dlopen(lib_m)
+-        x = m.sin(1.23)
++        x = m.lround(1.23)
+         assert x is None
+ 
+     def test_dlopen_filename(self):



reply via email to

[Prev in Thread] Current Thread [Next in Thread]