diff --git a/3000-add-loongarch64-support.patch b/0001-add-loongarch64-architecture-support.patch similarity index 90% rename from 3000-add-loongarch64-support.patch rename to 0001-add-loongarch64-architecture-support.patch index 4f8daceba62e4fe6b9513910b5a67e59ede3d673..bc2222f994bfa8d0c319ecaf868874da34687723 100644 --- a/3000-add-loongarch64-support.patch +++ b/0001-add-loongarch64-architecture-support.patch @@ -1,6 +1,6 @@ -From 5bad26bce4675cd6b590a2e990e69ff7a6c187b5 Mon Sep 17 00:00:00 2001 +From ca4845920d6587c5568d3ad294d17bbd9d9aa486 Mon Sep 17 00:00:00 2001 From: wang--ge -Date: Sat, 7 May 2022 14:39:18 +0800 +Date: Thu, 1 Jun 2023 09:47:40 +0800 Subject: [PATCH] add loongarch64 architecture support --- @@ -48,10 +48,10 @@ index 0000000..4252561 +#endif \ No newline at end of file diff --git a/src/greenlet/slp_platformselect.h b/src/greenlet/slp_platformselect.h -index b5e8eb6..1766e16 100644 +index b6a3e70..d71db10 100644 --- a/src/greenlet/slp_platformselect.h +++ b/src/greenlet/slp_platformselect.h -@@ -45,6 +45,8 @@ +@@ -49,6 +49,8 @@ extern "C" { #endif #elif defined(__GNUC__) && defined(__mips__) && defined(__linux__) #include "platform/switch_mips_unix.h" /* Linux/MIPS */ @@ -61,5 +61,5 @@ index b5e8eb6..1766e16 100644 #include "platform/switch_aarch64_gcc.h" /* Aarch64 ABI */ #elif defined(__GNUC__) && defined(__mc68000__) -- -2.27.0 +2.33.0 diff --git a/3001-add-sw_64-support.patch b/3001-add-sw_64-support.patch deleted file mode 100644 index 1b85a2725efff4a452e008bc4683f49dcb5c8345..0000000000000000000000000000000000000000 --- a/3001-add-sw_64-support.patch +++ /dev/null @@ -1,62 +0,0 @@ -diff -Naur greenlet-1.0.0.org/src/greenlet/platform/switch_sw_64_unix.h greenlet-1.0.0.sw/src/greenlet/platform/switch_sw_64_unix.h ---- greenlet-1.0.0.org/src/greenlet/platform/switch_sw_64_unix.h 1970-01-01 00:00:00.000000000 +0000 -+++ greenlet-1.0.0.sw/src/greenlet/platform/switch_sw_64_unix.h 2021-11-30 11:03:50.760000000 +0000 -@@ -0,0 +1,30 @@ -+#define STACK_REFPLUS 1 -+ -+#ifdef SLP_EVAL -+#define STACK_MAGIC 0 -+ -+#define REGS_TO_SAVE "$9", "$10", "$11", "$12", "$13", "$14", "$15", \ -+ "$f2", "$f3", "$f4", "$f5", "$f6", "$f7", "$f8", "$f9" -+ -+static int -+slp_switch(void) -+{ -+ register int ret; -+ register long *stackref, stsizediff; -+ __asm__ volatile ("" : : : REGS_TO_SAVE); -+ __asm__ volatile ("mov $30, %0" : "=r" (stackref) : ); -+ { -+ SLP_SAVE_STATE(stackref, stsizediff); -+ __asm__ volatile ( -+ "addl $30, %0, $30\n\t" -+ : /* no outputs */ -+ : "r" (stsizediff) -+ ); -+ SLP_RESTORE_STATE(); -+ } -+ __asm__ volatile ("" : : : REGS_TO_SAVE); -+ __asm__ volatile ("mov $31, %0" : "=r" (ret) : ); -+ return ret; -+} -+ -+#endif -diff -Naur greenlet-1.0.0.org/src/greenlet/slp_platformselect.h greenlet-1.0.0.sw/src/greenlet/slp_platformselect.h ---- greenlet-1.0.0.org/src/greenlet/slp_platformselect.h 2021-11-30 10:44:51.030000000 +0000 -+++ greenlet-1.0.0.sw/src/greenlet/slp_platformselect.h 2021-11-30 10:45:39.990000000 +0000 -@@ -55,4 +55,6 @@ - #include "platform/switch_riscv_unix.h" /* gcc on RISC-V */ - #elif defined(__GNUC__) && defined(__alpha__) - #include "platform/switch_alpha_unix.h" /* gcc on DEC Alpha */ -+#elif defined(__GNUC__) && defined(__sw_64__) -+#include "platform/switch_sw_64_unix.h" /* gcc on DEC Sw_64 */ - #endif -diff -Naur greenlet-1.0.0.org/src/greenlet.egg-info/SOURCES.txt greenlet-1.0.0.sw/src/greenlet.egg-info/SOURCES.txt ---- greenlet-1.0.0.org/src/greenlet.egg-info/SOURCES.txt 2021-11-30 10:44:51.030000000 +0000 -+++ greenlet-1.0.0.sw/src/greenlet.egg-info/SOURCES.txt 2021-11-30 10:46:37.890000000 +0000 -@@ -47,6 +47,7 @@ - src/greenlet/platform/setup_switch_x64_masm.cmd - src/greenlet/platform/switch_aarch64_gcc.h - src/greenlet/platform/switch_alpha_unix.h -+src/greenlet/platform/switch_sw_64_unix.h - src/greenlet/platform/switch_amd64_unix.h - src/greenlet/platform/switch_arm32_gcc.h - src/greenlet/platform/switch_arm32_ios.h -@@ -83,4 +84,4 @@ - src/greenlet/tests/test_throw.py - src/greenlet/tests/test_tracing.py - src/greenlet/tests/test_version.py --src/greenlet/tests/test_weakref.py -\ No newline at end of file -+src/greenlet/tests/test_weakref.py diff --git a/greenlet-1.1.2.tar.gz b/greenlet-1.1.2.tar.gz deleted file mode 100644 index e8fc281b3ed3ab8692f90afec54bab752f38a76e..0000000000000000000000000000000000000000 Binary files a/greenlet-1.1.2.tar.gz and /dev/null differ diff --git a/greenlet-2.0.2.tar.gz b/greenlet-2.0.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..ff0639a8038b80b0adf8cec64340d12461948276 Binary files /dev/null and b/greenlet-2.0.2.tar.gz differ diff --git a/python-greenlet.spec b/python-greenlet.spec index a1b671a23f94bc83cf5ec7ef4336190a5c483860..40af2965c4c12470503f19869840d8082b5c31c6 100644 --- a/python-greenlet.spec +++ b/python-greenlet.spec @@ -1,12 +1,13 @@ Name: python-greenlet -Version: 1.1.2 -Release: 2 +Version: 2.0.2 +Release: 1 Summary: lightweight coroutines for in-process concurrent programming License: Python-2.0 and MIT URL: https://github.com/python-greenlet/greenlet -Source0: https://files.pythonhosted.org/packages/0c/10/754e21b5bea89d0e73f99d60c83754df7cc64db74f47d98ab187669ce341/greenlet-1.1.2.tar.gz -Patch3000: 3000-add-loongarch64-support.patch -Patch3001: 3001-add-sw_64-support.patch +Source0: %{pypi_source greenlet} + +Patch0: 0001-add-loongarch64-architecture-support.patch + %description The greenlet package is a spin-off of Stackless, a version of CPython that supports micro-threads called "tasklets". Tasklets run pseudo-concurrently @@ -39,7 +40,10 @@ This package contains libraries and headier files for developing applications that use python3-greenlet. %prep -%autosetup -n greenlet-%{version} -p1 +%setup -n greenlet-%{version} +%ifarch loongarch64 +%patch0 -p1 +%endif %build %py3_build @@ -61,6 +65,9 @@ that use python3-greenlet. %{_includedir}/python%{python3_version}*/greenlet/ %changelog +* Wed Apr 24 2024 Han Guangyu - 2.0.2-1 +- update to 2.0.2 + * Sat Aug 12 2023 panchenbo - 1.1.2-2 - add loongarch64 and sw_64 support