Compare commits

...

2 Commits

Author SHA1 Message Date
David Abdurachmanov 5c9e6f94cb
Add riscv triplet detection
Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2020-06-02 06:41:13 +03:00
David Abdurachmanov 754b5f85f4
Disable test_ctypes test for riscv64
======================================================================
FAIL: test_pass_by_value (ctypes.test.test_structures.StructureTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.6.10/Lib/ctypes/test/test_structures.py", line 416, in test_pass_by_value
    self.assertEqual(s.first, 0xdeadbeef)
AssertionError: 195948557 != 3735928559
----------------------------------------------------------------------
Ran 471 tests in 22.182s
FAILED (failures=1, skipped=88)
1 test failed again:
    test_ctypes
== Tests result: FAILURE then FAILURE ==
383 tests OK.
10 slowest tests:
- test_weakref: 59 min 13 sec
- test_multiprocessing_spawn: 15 min 16 sec
- test_subprocess: 10 min 20 sec
- test_multiprocessing_forkserver: 6 min 23 sec
- test_lib2to3: 6 min 10 sec
- test_asyncio: 5 min 34 sec
- test_multiprocessing_fork: 5 min 10 sec
- test_buffer: 4 min 9 sec
- test_pickle: 4 min 7 sec
- test_io: 4 min 6 sec
1 test failed:
    test_ctypes
20 tests skipped:
    test_curses test_devpoll test_ioctl test_kqueue test_msilib
    test_ossaudiodev test_smtpnet test_socketserver test_startfile
    test_timeout test_tix test_tk test_ttk_guionly test_urllib2net
    test_urllibnet test_winconsoleio test_winreg test_winsound
    test_xmlrpc_net test_zipfile64
1 re-run test:
    test_ctypes
2 tests run no tests:
    test_dtrace test_future4
Total duration: 3 hour 42 min
Tests result: FAILURE then FAILURE
error: Bad exit status from /var/tmp/rpm-tmp.fmlas4 (%check)

Signed-off-by: David Abdurachmanov <david.abdurachmanov@sifive.com>
2020-06-01 20:37:49 +03:00
2 changed files with 28 additions and 2 deletions

View File

@ -0,0 +1,19 @@
diff --git a/configure.ac b/configure.ac
index c071ec3..53ed6cd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -846,6 +846,14 @@ cat >> conftest.c <<EOF
sparc64-linux-gnu
# elif defined(__sparc__)
sparc-linux-gnu
+# elif defined(__riscv)
+# if __riscv_xlen == 32
+ riscv32-linux-gnu
+# elif __riscv_xlen == 64
+ riscv64-linux-gnu
+# else
+# error unknown platform triplet
+# endif
# else
# error unknown platform triplet
# endif

View File

@ -17,7 +17,7 @@ URL: https://www.python.org/
#global prerel ...
%global upstream_version %{general_version}%{?prerel}
Version: %{general_version}%{?prerel:~%{prerel}}
Release: 5%{?dist}
Release: 5.0.riscv64%{?dist}
License: Python
@ -365,6 +365,9 @@ Patch294: 00294-define-TLS-cipher-suite-on-build-time.patch
# https://github.com/python/cpython/commit/ac827edc493d3ac3f5b9b0cc353df1d4b418a9aa
Patch343: 00343-faulthandler-gcc10.patch
# Add riscv64-linux-gnu to the triplet detection
Patch500: Python-3.6.10-riscv-triplets.patch
# (New patches go here ^^^)
#
# When adding new patches to "python" and "python3" in Fedora, EL, etc.,
@ -653,6 +656,7 @@ rm Lib/ensurepip/_bundled/*.whl
%patch294 -p1
%patch343 -p1
%patch500 -p1
# Remove files that should be generated by the build
# (This is after patching, so that we can use patches directly from upstream)
@ -1050,7 +1054,7 @@ CheckPython() {
%ifarch ppc64le aarch64
-x test_faulthandler \
%endif
%ifarch %{mips64}
%ifarch %{mips64} riscv64
-x test_ctypes \
%endif
%ifarch ppc64le
@ -1529,6 +1533,9 @@ CheckPython optimized
# ======================================================
%changelog
* Mon Jun 01 2020 David Abdurachmanov <david.abdurachmanov@sifive.com> - 3.6.10-5.0.riscv64
- Disable test_ctypes test for riscv64
* Thu May 28 2020 Victor Stinner <vstinner@python.org> - 3.6.10-5
- Fix python3-config --configdir (rhbz#1772988).