From f6b8fcb081d6eb8ef0050d08bcd2cf467097a648 Mon Sep 17 00:00:00 2001 From: "zhixin.zhang" Date: Mon, 12 Dec 2022 15:16:19 +0800 Subject: [PATCH 1/2] Add sw patch --- greenlet-1.0.0-sw.patch | 12 ++++++++++++ python-greenlet.spec | 8 ++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 greenlet-1.0.0-sw.patch diff --git a/greenlet-1.0.0-sw.patch b/greenlet-1.0.0-sw.patch new file mode 100644 index 0000000..b9cda28 --- /dev/null +++ b/greenlet-1.0.0-sw.patch @@ -0,0 +1,12 @@ +diff -Naur greenlet-1.0.0-bak/src/greenlet/greenlet.c greenlet-1.0.0/src/greenlet/greenlet.c +--- greenlet-1.0.0-bak/src/greenlet/greenlet.c 2022-08-03 07:20:15.655405640 +0000 ++++ greenlet-1.0.0/src/greenlet/greenlet.c 2022-08-03 07:21:07.705405640 +0000 +@@ -349,7 +349,7 @@ + #undef slp_switch + + #ifndef STACK_MAGIC +-# error \ ++#define error \ + "greenlet needs to be ported to this platform, or taught how to detect your compiler properly." + #endif /* !STACK_MAGIC */ + diff --git a/python-greenlet.spec b/python-greenlet.spec index a9bc4d6..142302b 100644 --- a/python-greenlet.spec +++ b/python-greenlet.spec @@ -1,13 +1,13 @@ Name: python-greenlet Version: 1.0.0 -Release: 2 +Release: 3 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/92/be/878cc5314fa5aadce33e68738c1a24debe317605196bdfc2049e66bc9c30/greenlet-1.0.0.tar.gz Patch0: 0001-add-loongarch64-architecture-support.patch - +Patch1: greenlet-1.0.0-sw.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 @@ -44,6 +44,7 @@ that use python3-greenlet. %ifarch loongarch64 %patch0 -p1 %endif +%patch1 -p1 %build %py3_build @@ -65,6 +66,9 @@ that use python3-greenlet. %{_includedir}/python%{python3_version}*/greenlet/ %changelog +* Mon Dec 12 2022 guojiancheng - 1.0.0-3 +- Add sw patch + * Thu Nov 17 2022 huajingyun - 1.0.0-2 - add loongarch64 architecture support -- Gitee From e6022725c0977d2af082736d04df8080a62b0315 Mon Sep 17 00:00:00 2001 From: "zhixin.zhang" Date: Mon, 26 Dec 2022 11:26:03 +0800 Subject: [PATCH 2/2] add sw patch --- python-greenlet.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-greenlet.spec b/python-greenlet.spec index 142302b..bdbc796 100644 --- a/python-greenlet.spec +++ b/python-greenlet.spec @@ -44,7 +44,10 @@ that use python3-greenlet. %ifarch loongarch64 %patch0 -p1 %endif + +%ifarch sw_64 %patch1 -p1 +%endif %build %py3_build -- Gitee