Source: rpy2
Version: 3.5.16-2
Severity: normal
Tags: patch
X-Debbugs-Cc: wuruil...@loongson.cn
User: debian-loonga...@lists.debian.org
Usertags: loong64

Dear Maintainer,

rpy2 compiled incorrectly on loongarch, the attachment has resolved the issue. 
Please merge patches.

wuruilong

-- System Information:
Debian Release: trixie/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: loong64 (loongarch64)

Kernel: Linux 5.10.0-60.96.0.126.oe2203.loongarch64 (SMP w/32 CPU threads)
Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: unable to detect
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 rpy2 (3.5.16-2) unstable; urgency=medium
 .
   [Bo Yu]
   * debian/patches/skip_complex_tests_on_mips64el_and_riscv64: Extended
     mips64el patch to also skip tests on riscv64
 .
   [Dirk Eddelbuettel]
   * Applied patch to address build issue on riskv64    (Closes: #1071362)
   * debian/patches/skip_r_embedding_tests: Skip embedding tests which now
     seg.fault under R 4.4.0 while we await a response from upstream
Author: Dirk Eddelbuettel <e...@debian.org>
Bug-Debian: https://bugs.debian.org/1071362

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2024-06-14

--- rpy2-3.5.16.orig/rpy2/tests/rinterface/test_na.py
+++ rpy2-3.5.16/rpy2/tests/rinterface/test_na.py
@@ -149,8 +149,8 @@ def test_NACharacter_in_vector():
     assert x.get_charsxp(1).rid == na_str.rid
     assert x[2] == 'cd'
 
-@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64') and sys.byteorder == 'little',
-                    reason="Complex tests fail for 'mips64el' or 'riscv64'.")
+@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64' or platform.machine() == 'loongarch64') and sys.byteorder == 'little',
+                    reason="Complex tests fail for 'mips64el' or 'riscv64' or 
'loongarch64'.")
 def test_R_to_NAComplex():
     r_na_complex = ri.evalr('NA_complex_')[0]
     assert math.isnan(r_na_complex.real)
--- rpy2-3.5.16.orig/rpy2/tests/rinterface/test_vector_complex.py
+++ rpy2-3.5.16/rpy2/tests/rinterface/test_vector_complex.py
@@ -6,8 +6,8 @@ import platform
 ri.initr()
 
 
-@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64') and sys.byteorder == 'little',
-                    reason="Complex tests fail for 'mips64el' or 'riscv64'.")
+@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64' or platform.machine() == 'loongarch64') and sys.byteorder == 'little',
+                    reason="Complex tests fail for 'mips64el' or 'riscv64' or 
'loongarch64'.")
 def test_init_from_seqr():
     seq = [1+2j, 5+7j, 0+1j]
     v = ri.ComplexSexpVector(seq)
@@ -22,23 +22,23 @@ def test_init_from_seq_invalid_item():
         ri.ComplexSexpVector(seq)
 
 
-@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64') and sys.byteorder == 'little',
-                    reason="Complex tests fail for 'mips64el' or 'riscv64'.")
+@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64' or platform.machine() == 'loongarch64') and sys.byteorder == 'little',
+                    reason="Complex tests fail for 'mips64el' or 'riscv64' or 
'loongarch64'.")
 def test_getitem():
     vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j])
     assert vec[1] == 5+7j
 
 
-@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64') and sys.byteorder == 'little',
-                    reason="Complex tests fail for 'mips64el' or 'riscv64'.")
+@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64' or platform.machine() == 'loongarch64') and sys.byteorder == 'little',
+                    reason="Complex tests fail for 'mips64el' or 'riscv64' or 
'loongarch64'.")
 def test_setitem():
     vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j])
     vec[1] = 100+3j
     assert vec[1] == 100+3j
 
 
-@pytest.mark.skipif((platform.machine() == 'mips64'  or platform.machine() == 
'riscv64') and sys.byteorder == 'little',
-                    reason="Complex tests fail for 'mips64el' or 'riscv64'.")
+@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64' or platform.machine() == 'loongarch64') and sys.byteorder == 'little',
+                    reason="Complex tests fail for 'mips64el' or 'riscv64' or 
'loongarch64'.")
 def test_getslice():
     vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j])
     vec_s = vec[0:2]
@@ -47,8 +47,8 @@ def test_getslice():
     assert vec_s[1] == 5+7j
 
 
-@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64') and sys.byteorder == 'little',
-                    reason="Complex tests fail for 'mips64el' or 'riscv64'.")
+@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64' or platform.machine() == 'loongarch64') and sys.byteorder == 'little',
+                    reason="Complex tests fail for 'mips64el' or 'riscv64' or 
'loongarch64'.")
 def test_getslice_negative():
     vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j])
     vec_s = vec[-2:-1]
@@ -56,8 +56,8 @@ def test_getslice_negative():
     assert vec_s[0] == 5+7j
 
 
-@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64') and sys.byteorder == 'little',
-                    reason="Complex tests fail for 'mips64el' or 'riscv64'.")
+@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64' or platform.machine() == 'loongarch64') and sys.byteorder == 'little',
+                    reason="Complex tests fail for 'mips64el' or 'riscv64' or 
'loongarch64'.")
 def test_setslice():
     vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j])
     vec[0:2] = ri.ComplexSexpVector([100+3j, 5-5j])
@@ -66,8 +66,8 @@ def test_setslice():
     assert vec[1] == 5-5j
 
 
-@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64') and sys.byteorder == 'little',
-                    reason="Complex tests fail for 'mips64el' or 'riscv64'.")
+@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64' or platform.machine() == 'loongarch64') and sys.byteorder == 'little',
+                    reason="Complex tests fail for 'mips64el' or 'riscv64' or 
'loongarch64'.")
 def test_setslice_negative():
     vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j])
     vec[-2:-1] = ri.ComplexSexpVector([100+3j, ])
@@ -75,8 +75,8 @@ def test_setslice_negative():
     assert vec[1] == 100+3j
 
 
-@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64') and sys.byteorder == 'little',
-                    reason="Complex tests fail for 'mips64el' or 'riscv64'.")
+@pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() == 
'riscv64' or platform.machine() == 'loongarch64') and sys.byteorder == 'little',
+                    reason="Complex tests fail for 'mips64el' or 'riscv64' or 
'loongarch64'.")
 def test_index():
     vec = ri.ComplexSexpVector([1+2j, 5+7j, 0+1j])
     assert vec.index(5+7j) == 1
--- rpy2-3.5.16.orig/rpy2/tests/robjects/test_conversion_numpy.py
+++ rpy2-3.5.16/rpy2/tests/robjects/test_conversion_numpy.py
@@ -71,8 +71,8 @@ class TestNumpyConversions(object):
         for orig, conv in zip(l, f_r):
             assert abs(orig-conv) < 0.000001
         
-    @pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() 
== 'riscv64') and sys.byteorder == 'little',
-                        reason="Complex tests fail for 'mips64el' or 
'riscv64'.")
+    @pytest.mark.skipif((platform.machine() == 'mips64' or platform.machine() 
== 'riscv64' or platform.machine() == 'loongarch64') and sys.byteorder == 
'little',
+                        reason="Complex tests fail for 'mips64el' or 'riscv64' 
or 'loongarch64'.")
     def test_vector_complex(self):
         l = [1j, 2j, 3j]
         c = numpy.array(l, dtype=numpy.complex_)

Reply via email to