diff --git a/debian/changelog b/debian/changelog index 613398d..5e0c271 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +python3.12 (3.12.11-0deepin2) unstable; urgency=medium + + * feat: add sw64 support. + + -- hudeng Wed, 04 Jun 2025 11:07:55 +0800 + python3.12 (3.12.11-0deepin1) unstable; urgency=medium * Python 3.12.11 release. diff --git a/debian/multiarch.h.in b/debian/multiarch.h.in index e00632c..1257331 100644 --- a/debian/multiarch.h.in +++ b/debian/multiarch.h.in @@ -103,6 +103,8 @@ # else # include # endif +# elif defined(__sw_64__) +# include # else # error unknown multiarch location for @header@ # endif diff --git a/debian/patches/0001-deepin-sw_64-support.diff b/debian/patches/0001-deepin-sw_64-support.diff new file mode 100644 index 0000000..7054a79 --- /dev/null +++ b/debian/patches/0001-deepin-sw_64-support.diff @@ -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 < conftest.c <