Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
python3.12 (3.12.11-0deepin2) unstable; urgency=medium

* feat: add sw64 support.

-- hudeng <hudeng@deepin.org> Wed, 04 Jun 2025 11:07:55 +0800

python3.12 (3.12.11-0deepin1) unstable; urgency=medium

* Python 3.12.11 release.
Expand Down
2 changes: 2 additions & 0 deletions debian/multiarch.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@
# else
# include <riscv32-linux-gnu/@subdir@/@header@>
# endif
# elif defined(__sw_64__)
# include <sw_64-linux-gnu/@subdir@/@header@>
# else
# error unknown multiarch location for @header@
# endif
Expand Down
65 changes: 65 additions & 0 deletions debian/patches/0001-deepin-sw_64-support.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
Index: python3.12/Lib/test/test_sysconfig.py
===================================================================
--- python3.12.orig/Lib/test/test_sysconfig.py
+++ python3.12/Lib/test/test_sysconfig.py
@@ -505,7 +505,7 @@ class TestSysConfig(unittest.TestCase):
import platform, re
machine = platform.machine()
suffix = sysconfig.get_config_var('EXT_SUFFIX')
- if re.match('(aarch64|arm|mips|ppc|powerpc|s390|sparc)', machine):
+ if re.match('(aarch64|arm|mips|ppc|powerpc|s390|sparc|sw_64)', machine):
self.assertTrue('linux' in suffix, suffix)
if re.match('(i[3-6]86|x86_64)$', machine):
if ctypes.sizeof(ctypes.c_char_p()) == 4:
Index: python3.12/config.guess
===================================================================
--- python3.12.orig/config.guess
+++ python3.12/config.guess
@@ -1140,6 +1140,9 @@ EOF
sparc:Linux:*:* | sparc64:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
+ sw_64:Linux:*:*)
+ GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+ ;;
tile*:Linux:*:*)
GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
;;
Index: python3.12/config.sub
===================================================================
--- python3.12.orig/config.sub
+++ python3.12/config.sub
@@ -1262,6 +1262,7 @@ case $cpu-$vendor in
| sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
| spu \
+ | sw_64\
| tahoe \
| thumbv7* \
| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
Index: python3.12/configure
===================================================================
--- python3.12.orig/configure
+++ python3.12/configure
@@ -6891,6 +6891,8 @@ cat > conftest.c <<EOF
riscv32-linux-gnu
# elif __riscv_xlen == 64
riscv64-linux-gnu
+# elif defined(__sw_64__)
+ sw_64-linux-gnu
# else
# error unknown platform triplet
# endif
Index: python3.12/configure.ac
===================================================================
--- python3.12.orig/configure.ac
+++ python3.12/configure.ac
@@ -1063,6 +1063,8 @@ cat > conftest.c <<EOF
# else
# error unknown platform triplet
# endif
+# elif defined(__sw_64__)
+ sw_64-linux-gnu
# else
# error unknown platform triplet
# endif
1 change: 1 addition & 0 deletions debian/patches/series
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ python3.12-updates.diff
issue108447.diff
no-sphinx-8.2.diff
Add-Debian-specific-documentation-path-to-IDLE-menu.diff
0001-deepin-sw_64-support.diff
11 changes: 8 additions & 3 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ DEB_HOST_ARCH_OS ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_ARCH_OS)
DEB_HOST_GNU_TYPE ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_GNU_TYPE)
DEB_HOST_MULTIARCH ?= $(call vafilt,$(DPKG_VARS),DEB_HOST_MULTIARCH)

ifeq ($(DEB_HOST_ARCH),sw64)
DEB_BUILD_OPTIONS += nocheck
DEB_BUILD_OPTIONS += nobench
endif

ifeq ($(DEB_HOST_ARCH_OS),linux)
PLAT = linux
else ifeq ($(DEB_HOST_ARCH_OS),kfreebsd)
Expand Down Expand Up @@ -613,14 +618,14 @@ ifneq (,$(filter $(DEB_HOST_ARCH), arm armel m68k))
endif
TEST_EXCLUDES += test_ttk_guionly
# https://buildd.debian.org/status/logs.php?pkg=python3.5&ver=3.5.1-1&arch=alpha&suite=sid
ifneq (,$(filter $(DEB_HOST_ARCH), alpha))
ifneq (,$(filter $(DEB_HOST_ARCH), alpha sw64))
TEST_EXCLUDES += test_signal
endif
ifneq (,$(filter $(DEB_HOST_ARCH), sparc sparc64))
TEST_EXCLUDES += test_gdb
endif

ifneq (,$(filter $(DEB_HOST_ARCH), alpha armhf riscv64 sparc64))
ifneq (,$(filter $(DEB_HOST_ARCH), alpha armhf riscv64 sparc64 sw64))
TEST_EXCLUDES += test_concurrent_futures
endif

Expand Down Expand Up @@ -668,7 +673,7 @@ else
@env
@echo ========================================

ifeq (,$(findstring $(DEB_HOST_ARCH), alpha))
ifeq (,$(findstring $(DEB_HOST_ARCH), alpha sw64))
( \
echo '#! /bin/sh'; \
echo 'set -x'; \
Expand Down
Loading