Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a9feed2c52 |
10
.gitignore
vendored
10
.gitignore
vendored
@ -1,11 +1 @@
|
|||||||
greenlet-0.3.1.tar.gz
|
greenlet-0.3.1.tar.gz
|
||||||
/greenlet-0.4.0.zip
|
|
||||||
/greenlet-0.4.1.zip
|
|
||||||
/greenlet-0.4.2.zip
|
|
||||||
/greenlet-0.4.5.zip
|
|
||||||
/greenlet-0.4.7.zip
|
|
||||||
/greenlet-0.4.9.zip
|
|
||||||
/0.4.11.tar.gz
|
|
||||||
/greenlet-0.4.12.tar.gz
|
|
||||||
/greenlet-0.4.13.tar.gz
|
|
||||||
/greenlet-0.4.14.tar.gz
|
|
||||||
|
34
base-exception.patch
Normal file
34
base-exception.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
wget https://github.com/python-greenlet/greenlet/commit/2f81f5d.patch
|
||||||
|
|
||||||
|
From 2f81f5de275c8dad13c5497c540ab96952a24071 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexey Borzenkov <snaury@gmail.com>
|
||||||
|
Date: Mon, 28 Feb 2011 00:48:00 +0300
|
||||||
|
Subject: [PATCH] Make GreenletExit based on BaseException on Python >= 2.5
|
||||||
|
|
||||||
|
This way it is more similar to SystemExit and becomes a little
|
||||||
|
harder to accidentally catch with "except Exception:" statement.
|
||||||
|
---
|
||||||
|
greenlet.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/greenlet.c b/greenlet.c
|
||||||
|
index 25358ce..973a12c 100755
|
||||||
|
--- a/greenlet.c
|
||||||
|
+++ b/greenlet.c
|
||||||
|
@@ -1266,8 +1266,13 @@ void initgreenlet(void)
|
||||||
|
{
|
||||||
|
INITERROR;
|
||||||
|
}
|
||||||
|
+#if PY_MAJOR_VERSION >= 3 || (PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION >= 5)
|
||||||
|
+ PyExc_GreenletExit = PyErr_NewException("greenlet.GreenletExit",
|
||||||
|
+ PyExc_BaseException, NULL);
|
||||||
|
+#else
|
||||||
|
PyExc_GreenletExit = PyErr_NewException("greenlet.GreenletExit",
|
||||||
|
NULL, NULL);
|
||||||
|
+#endif
|
||||||
|
if (PyExc_GreenletExit == NULL)
|
||||||
|
{
|
||||||
|
INITERROR;
|
||||||
|
--
|
||||||
|
1.7.10
|
||||||
|
|
@ -1,48 +0,0 @@
|
|||||||
From d05b62bb75e6a3e217435a1fe0f15a53e692898c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Victor Stinner <vstinner@python.org>
|
|
||||||
Date: Wed, 18 Mar 2020 15:09:33 +0100
|
|
||||||
Subject: [PATCH] Port to Python 3.9
|
|
||||||
|
|
||||||
On Python 3.9, define _Py_DEC_REFTOTAL which has been removed by:
|
|
||||||
https://github.com/python/cpython/commit/49932fec62c616ec88da52642339d83ae719e924
|
|
||||||
|
|
||||||
Replace also PyEval_CallObjectWithKeywords() with PyObject_Call(),
|
|
||||||
since PyEval_CallObjectWithKeywords() has been deprecated in
|
|
||||||
Python 3.9 and PyObject_Call() has the same behavior. The only
|
|
||||||
difference is that PyEval_CallObjectWithKeywords() can be called with
|
|
||||||
args=NULL, but g_initialstub() ensures that args is not NULL.
|
|
||||||
---
|
|
||||||
greenlet.c | 13 +++++++++++--
|
|
||||||
1 file changed, 11 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/greenlet.c b/greenlet.c
|
|
||||||
index ec738b9..d37fc97 100644
|
|
||||||
--- a/greenlet.c
|
|
||||||
+++ b/greenlet.c
|
|
||||||
@@ -109,6 +109,16 @@ extern PyTypeObject PyGreenlet_Type;
|
|
||||||
#define GREENLET_USE_TRACING 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#ifndef _Py_DEC_REFTOTAL
|
|
||||||
+ /* _Py_DEC_REFTOTAL macro has been removed from Python 3.9 by:
|
|
||||||
+ https://github.com/python/cpython/commit/49932fec62c616ec88da52642339d83ae719e924 */
|
|
||||||
+# ifdef Py_REF_DEBUG
|
|
||||||
+# define _Py_DEC_REFTOTAL _Py_RefTotal--
|
|
||||||
+# else
|
|
||||||
+# define _Py_DEC_REFTOTAL
|
|
||||||
+# endif
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/* Weak reference to the switching-to greenlet during the slp switch */
|
|
||||||
static PyGreenlet* volatile ts_target = NULL;
|
|
||||||
/* Strong reference to the switching from greenlet after the switch */
|
|
||||||
@@ -820,8 +830,7 @@ static int GREENLET_NOINLINE(g_initialstub)(void* mark)
|
|
||||||
result = NULL;
|
|
||||||
} else {
|
|
||||||
/* call g.run(*args, **kwargs) */
|
|
||||||
- result = PyEval_CallObjectWithKeywords(
|
|
||||||
- run, args, kwargs);
|
|
||||||
+ result = PyObject_Call(run, args, kwargs);
|
|
||||||
Py_DECREF(args);
|
|
||||||
Py_XDECREF(kwargs);
|
|
||||||
}
|
|
106
get-rid-of-ts_origin.patch
Normal file
106
get-rid-of-ts_origin.patch
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
diff -up greenlet-0.3.1/greenlet.c.get-rid-of-ts_origin greenlet-0.3.1/greenlet.c
|
||||||
|
--- greenlet-0.3.1/greenlet.c.get-rid-of-ts_origin 2010-04-05 17:24:25.000000000 -0400
|
||||||
|
+++ greenlet-0.3.1/greenlet.c 2011-10-19 13:59:30.485035920 -0400
|
||||||
|
@@ -116,10 +116,8 @@ extern PyTypeObject PyGreenlet_Type;
|
||||||
|
|
||||||
|
/* The current greenlet in this thread state (holds a reference) */
|
||||||
|
static PyGreenlet* ts_current = NULL;
|
||||||
|
-/* Holds a reference to the switching-from stack during the slp switch */
|
||||||
|
-static PyGreenlet* ts_origin = NULL;
|
||||||
|
/* Holds a reference to the switching-to stack during the slp switch */
|
||||||
|
-static PyGreenlet* ts_target = NULL;
|
||||||
|
+static PyGreenlet* volatile ts_target = NULL;
|
||||||
|
/* NULL if error, otherwise args tuple to pass around during slp switch */
|
||||||
|
static PyObject* ts_passaround_args = NULL;
|
||||||
|
static PyObject* ts_passaround_kwargs = NULL;
|
||||||
|
@@ -257,6 +255,7 @@ static int g_save(PyGreenlet* g, char* s
|
||||||
|
static void slp_restore_state(void)
|
||||||
|
{
|
||||||
|
PyGreenlet* g = ts_target;
|
||||||
|
+ PyGreenlet* owner = ts_current;
|
||||||
|
|
||||||
|
/* Restore the heap copy back into the C stack */
|
||||||
|
if (g->stack_saved != 0) {
|
||||||
|
@@ -265,30 +264,32 @@ static void slp_restore_state(void)
|
||||||
|
g->stack_copy = NULL;
|
||||||
|
g->stack_saved = 0;
|
||||||
|
}
|
||||||
|
- if (ts_current->stack_stop == g->stack_stop)
|
||||||
|
- g->stack_prev = ts_current->stack_prev;
|
||||||
|
- else
|
||||||
|
- g->stack_prev = ts_current;
|
||||||
|
+ if (owner->stack_start == NULL)
|
||||||
|
+ owner = owner->stack_prev; /* greenlet is dying, skip it */
|
||||||
|
+ while (owner && owner->stack_stop <= g->stack_stop)
|
||||||
|
+ owner = owner->stack_prev; /* find greenlet with more stack */
|
||||||
|
+ g->stack_prev = owner;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int slp_save_state(char* stackref)
|
||||||
|
{
|
||||||
|
/* must free all the C stack up to target_stop */
|
||||||
|
char* target_stop = ts_target->stack_stop;
|
||||||
|
- assert(ts_current->stack_saved == 0);
|
||||||
|
- if (ts_current->stack_start == NULL)
|
||||||
|
- ts_current = ts_current->stack_prev; /* not saved if dying */
|
||||||
|
+ PyGreenlet* owner = ts_current;
|
||||||
|
+ assert(owner->stack_saved == 0);
|
||||||
|
+ if (owner->stack_start == NULL)
|
||||||
|
+ owner = owner->stack_prev; /* not saved if dying */
|
||||||
|
else
|
||||||
|
- ts_current->stack_start = stackref;
|
||||||
|
+ owner->stack_start = stackref;
|
||||||
|
|
||||||
|
- while (ts_current->stack_stop < target_stop) {
|
||||||
|
+ while (owner->stack_stop < target_stop) {
|
||||||
|
/* ts_current is entierely within the area to free */
|
||||||
|
- if (g_save(ts_current, ts_current->stack_stop))
|
||||||
|
+ if (g_save(owner, owner->stack_stop))
|
||||||
|
return -1; /* XXX */
|
||||||
|
- ts_current = ts_current->stack_prev;
|
||||||
|
+ owner = owner->stack_prev;
|
||||||
|
}
|
||||||
|
- if (ts_current != ts_target) {
|
||||||
|
- if (g_save(ts_current, target_stop))
|
||||||
|
+ if (owner != ts_target) {
|
||||||
|
+ if (g_save(owner, target_stop))
|
||||||
|
return -1; /* XXX */
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
@@ -337,11 +338,11 @@ static int g_switchstack(void)
|
||||||
|
*/
|
||||||
|
int err;
|
||||||
|
{ /* save state */
|
||||||
|
+ PyGreenlet* current = ts_current;
|
||||||
|
PyThreadState* tstate = PyThreadState_GET();
|
||||||
|
- ts_current->recursion_depth = tstate->recursion_depth;
|
||||||
|
- ts_current->top_frame = tstate->frame;
|
||||||
|
+ current->recursion_depth = tstate->recursion_depth;
|
||||||
|
+ current->top_frame = tstate->frame;
|
||||||
|
}
|
||||||
|
- ts_origin = ts_current;
|
||||||
|
err = _PyGreenlet_slp_switch();
|
||||||
|
if (err < 0) { /* error */
|
||||||
|
Py_XDECREF(ts_passaround_args);
|
||||||
|
@@ -351,13 +352,15 @@ static int g_switchstack(void)
|
||||||
|
ts_passaround_kwargs = NULL;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
+ PyGreenlet* target = ts_target;
|
||||||
|
+ PyGreenlet* origin = ts_current;
|
||||||
|
PyThreadState* tstate = PyThreadState_GET();
|
||||||
|
- tstate->recursion_depth = ts_target->recursion_depth;
|
||||||
|
- tstate->frame = ts_target->top_frame;
|
||||||
|
- ts_target->top_frame = NULL;
|
||||||
|
- ts_current = ts_target;
|
||||||
|
- Py_INCREF(ts_target);
|
||||||
|
- Py_DECREF(ts_origin);
|
||||||
|
+ tstate->recursion_depth = target->recursion_depth;
|
||||||
|
+ tstate->frame = target->top_frame;
|
||||||
|
+ target->top_frame = NULL;
|
||||||
|
+ ts_current = target;
|
||||||
|
+ Py_INCREF(target);
|
||||||
|
+ Py_DECREF(origin);
|
||||||
|
}
|
||||||
|
return err;
|
||||||
|
}
|
62
i686-register-fixes.patch
Normal file
62
i686-register-fixes.patch
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Alexey Borzenkov <snaury@gmail.com>
|
||||||
|
# Date 1313701525 -14400
|
||||||
|
# Node ID 25bf29f4d3b79b026c1c05787bb741a8e7ef2229
|
||||||
|
# Parent c0bf397a723d4b61d7ef78cf575dea4c0fdb527e
|
||||||
|
Fix compilation and register problems on some i386 configurations
|
||||||
|
|
||||||
|
diff -r c0bf397a723d4b61d7ef78cf575dea4c0fdb527e -r 25bf29f4d3b79b026c1c05787bb741a8e7ef2229 platform/switch_x86_unix.h
|
||||||
|
--- a/platform/switch_x86_unix.h Thu Aug 18 02:44:20 2011 +0400
|
||||||
|
+++ b/platform/switch_x86_unix.h Fri Aug 19 01:05:25 2011 +0400
|
||||||
|
@@ -2,6 +2,8 @@
|
||||||
|
* this is the internal transfer function.
|
||||||
|
*
|
||||||
|
* HISTORY
|
||||||
|
+ * 19-Aug-11 Alexey Borzenkov <snaury@gmail.com>
|
||||||
|
+ * Correctly save ebp, ebx and cw
|
||||||
|
* 07-Sep-05 (py-dev mailing list discussion)
|
||||||
|
* removed 'ebx' from the register-saved. !!!! WARNING !!!!
|
||||||
|
* It means that this file can no longer be compiled statically!
|
||||||
|
@@ -34,18 +36,13 @@
|
||||||
|
static int
|
||||||
|
slp_switch(void)
|
||||||
|
{
|
||||||
|
+ void *ebp, *ebx;
|
||||||
|
+ unsigned short cw;
|
||||||
|
register int *stackref, stsizediff;
|
||||||
|
- /* !!!!WARNING!!!! need to add "ebx" in the next line, as well as in the
|
||||||
|
- * last line of this function, if this header file is meant to be compiled
|
||||||
|
- * non-dynamically!
|
||||||
|
- */
|
||||||
|
- __asm__ volatile ("" : : :
|
||||||
|
- "esi",
|
||||||
|
- "edi"
|
||||||
|
-#ifdef __MINGW32__
|
||||||
|
- , "ebx"
|
||||||
|
-#endif
|
||||||
|
- );
|
||||||
|
+ __asm__ volatile ("" : : : "esi", "edi");
|
||||||
|
+ __asm__ volatile ("fstcw %0" : "=m" (cw));
|
||||||
|
+ __asm__ volatile ("movl %%ebp, %0" : "=m" (ebp));
|
||||||
|
+ __asm__ volatile ("movl %%ebx, %0" : "=m" (ebx));
|
||||||
|
__asm__ ("movl %%esp, %0" : "=g" (stackref));
|
||||||
|
{
|
||||||
|
SLP_SAVE_STATE(stackref, stsizediff);
|
||||||
|
@@ -57,13 +54,10 @@
|
||||||
|
);
|
||||||
|
SLP_RESTORE_STATE();
|
||||||
|
}
|
||||||
|
- __asm__ volatile ("" : : :
|
||||||
|
- "esi",
|
||||||
|
- "edi"
|
||||||
|
-#ifdef __MINGW32__
|
||||||
|
- , "ebx"
|
||||||
|
-#endif
|
||||||
|
- );
|
||||||
|
+ __asm__ volatile ("movl %0, %%ebx" : : "m" (ebx));
|
||||||
|
+ __asm__ volatile ("movl %0, %%ebp" : : "m" (ebp));
|
||||||
|
+ __asm__ volatile ("fldcw %0" : : "m" (cw));
|
||||||
|
+ __asm__ volatile ("" : : : "esi", "edi");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
104
ppc64-support.patch
Normal file
104
ppc64-support.patch
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
Backport from 0.4.0
|
||||||
|
|
||||||
|
commit 6f3714499e24b88cc05a02c8692015c5c17c5508
|
||||||
|
Author: Michael Ellerman <michael@ellerman.id.au>
|
||||||
|
Date: Wed Apr 18 17:58:00 2012 -0700
|
||||||
|
|
||||||
|
Add ppc64 platform
|
||||||
|
|
||||||
|
Add 64-bit ppc support with a new platform file and update to the
|
||||||
|
platformselect code.
|
||||||
|
|
||||||
|
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
|
||||||
|
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
|
||||||
|
(cherry picked from commit b17773a7807f85f897413391f59d4a6d65ac9008)
|
||||||
|
|
||||||
|
diff --git a/platform/switch_ppc64_linux.h b/platform/switch_ppc64_linux.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000..ded1fda
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/platform/switch_ppc64_linux.h
|
||||||
|
@@ -0,0 +1,70 @@
|
||||||
|
+/*
|
||||||
|
+ * this is the internal transfer function.
|
||||||
|
+ *
|
||||||
|
+ * HISTORY
|
||||||
|
+ * 09-Mar-12 Michael Ellerman <michael@ellerman.id.au>
|
||||||
|
+ * 64-bit implementation, copied from 32-bit.
|
||||||
|
+ * 07-Sep-05 (py-dev mailing list discussion)
|
||||||
|
+ * removed 'r31' from the register-saved. !!!! WARNING !!!!
|
||||||
|
+ * It means that this file can no longer be compiled statically!
|
||||||
|
+ * It is now only suitable as part of a dynamic library!
|
||||||
|
+ * 14-Jan-04 Bob Ippolito <bob@redivi.com>
|
||||||
|
+ * added cr2-cr4 to the registers to be saved.
|
||||||
|
+ * Open questions: Should we save FP registers?
|
||||||
|
+ * What about vector registers?
|
||||||
|
+ * Differences between darwin and unix?
|
||||||
|
+ * 24-Nov-02 Christian Tismer <tismer@tismer.com>
|
||||||
|
+ * needed to add another magic constant to insure
|
||||||
|
+ * that f in slp_eval_frame(PyFrameObject *f)
|
||||||
|
+ * STACK_REFPLUS will probably be 1 in most cases.
|
||||||
|
+ * gets included into the saved stack area.
|
||||||
|
+ * 04-Oct-02 Gustavo Niemeyer <niemeyer@conectiva.com>
|
||||||
|
+ * Ported from MacOS version.
|
||||||
|
+ * 17-Sep-02 Christian Tismer <tismer@tismer.com>
|
||||||
|
+ * after virtualizing stack save/restore, the
|
||||||
|
+ * stack size shrunk a bit. Needed to introduce
|
||||||
|
+ * an adjustment STACK_MAGIC per platform.
|
||||||
|
+ * 15-Sep-02 Gerd Woetzel <gerd.woetzel@GMD.DE>
|
||||||
|
+ * slightly changed framework for sparc
|
||||||
|
+ * 29-Jun-02 Christian Tismer <tismer@tismer.com>
|
||||||
|
+ * Added register 13-29, 31 saves. The same way as
|
||||||
|
+ * Armin Rigo did for the x86_unix version.
|
||||||
|
+ * This seems to be now fully functional!
|
||||||
|
+ * 04-Mar-02 Hye-Shik Chang <perky@fallin.lv>
|
||||||
|
+ * Ported from i386.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#define STACK_REFPLUS 1
|
||||||
|
+
|
||||||
|
+#ifdef SLP_EVAL
|
||||||
|
+
|
||||||
|
+#define STACK_MAGIC 6
|
||||||
|
+
|
||||||
|
+/* !!!!WARNING!!!! need to add "r31" in the next line if this header file
|
||||||
|
+ * is meant to be compiled non-dynamically!
|
||||||
|
+ */
|
||||||
|
+#define REGS_TO_SAVE "r2", "r14", "r15", "r16", "r17", "r18", "r19", "r20", \
|
||||||
|
+ "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r31", \
|
||||||
|
+ "cr2", "cr3", "cr4"
|
||||||
|
+static int
|
||||||
|
+slp_switch(void)
|
||||||
|
+{
|
||||||
|
+ register long *stackref, stsizediff;
|
||||||
|
+ __asm__ volatile ("" : : : REGS_TO_SAVE);
|
||||||
|
+ __asm__ ("mr %0, 1" : "=g" (stackref) : );
|
||||||
|
+ {
|
||||||
|
+ SLP_SAVE_STATE(stackref, stsizediff);
|
||||||
|
+ __asm__ volatile (
|
||||||
|
+ "mr 11, %0\n"
|
||||||
|
+ "add 1, 1, 11\n"
|
||||||
|
+ : /* no outputs */
|
||||||
|
+ : "g" (stsizediff)
|
||||||
|
+ : "11"
|
||||||
|
+ );
|
||||||
|
+ SLP_RESTORE_STATE();
|
||||||
|
+ }
|
||||||
|
+ __asm__ volatile ("" : : : REGS_TO_SAVE);
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
diff --git a/slp_platformselect.h b/slp_platformselect.h
|
||||||
|
index 38b7ef4..68982d3 100644
|
||||||
|
--- a/slp_platformselect.h
|
||||||
|
+++ b/slp_platformselect.h
|
||||||
|
@@ -8,6 +8,8 @@
|
||||||
|
#include "platform/switch_amd64_unix.h" /* gcc on amd64 */
|
||||||
|
#elif defined(__GNUC__) && defined(__i386__)
|
||||||
|
#include "platform/switch_x86_unix.h" /* gcc on X86 */
|
||||||
|
+#elif defined(__GNUC__) && defined(__powerpc64__) && defined(__linux__)
|
||||||
|
+#include "platform/switch_ppc64_linux.h" /* gcc on PowerPC 64-bit */
|
||||||
|
#elif defined(__GNUC__) && defined(__PPC__) && defined(__linux__)
|
||||||
|
#include "platform/switch_ppc_unix.h" /* gcc on PowerPC */
|
||||||
|
#elif defined(__GNUC__) && defined(__ppc__) && defined(__APPLE__)
|
@ -1,172 +1,92 @@
|
|||||||
%global modname greenlet
|
# sitelib for noarch packages, sitearch for others (remove the unneeded one)
|
||||||
|
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||||
|
%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||||
|
|
||||||
Name: python-%{modname}
|
Name: python-greenlet
|
||||||
Version: 0.4.14
|
Version: 0.3.1
|
||||||
Release: 8%{?dist}
|
Release: 12%{?dist}
|
||||||
Summary: Lightweight in-process concurrent programming
|
Summary: Lightweight in-process concurrent programming
|
||||||
|
Group: Development/Libraries
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/python-greenlet/greenlet
|
URL: http://pypi.python.org/pypi/greenlet
|
||||||
Source0: %{url}/archive/%{version}/%{modname}-%{version}.tar.gz
|
Source0: http://pypi.python.org/packages/source/g/greenlet/greenlet-%{version}.tar.gz
|
||||||
BuildRequires: gcc-c++
|
|
||||||
Patch1: %{url}/commit/c644ca6823994b958e004b3e00b587723181b58e.patch
|
|
||||||
|
|
||||||
%global _description \
|
# Based on https://bitbucket.org/ambroff/greenlet/changeset/2d5b17472757
|
||||||
The greenlet package is a spin-off of Stackless, a version of CPython\
|
# slightly fixed up to apply cleanly. Avoid rhbz#746771
|
||||||
that supports micro-threads called "tasklets". Tasklets run\
|
Patch1: get-rid-of-ts_origin.patch
|
||||||
pseudo-concurrently (typically in a single or a few OS-level threads)\
|
# Apply https://bitbucket.org/ambroff/greenlet/changeset/25bf29f4d3b7
|
||||||
|
# to fix the i686 crash in rhbz#746771
|
||||||
|
Patch2: i686-register-fixes.patch
|
||||||
|
# Backport https://github.com/python-greenlet/greenlet/commit/b17773a7
|
||||||
|
# from greenlet 0.4.0 to support ppc64
|
||||||
|
Patch3: ppc64-support.patch
|
||||||
|
# Backport https://github.com/python-greenlet/greenlet/commit/2f81f5d
|
||||||
|
# from greenlet 0.3.2 to fix http://pad.lv/1097203
|
||||||
|
Patch4: base-exception.patch
|
||||||
|
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python-setuptools
|
||||||
|
|
||||||
|
%description
|
||||||
|
The greenlet package is a spin-off of Stackless, a version of CPython
|
||||||
|
that supports micro-threads called "tasklets". Tasklets run
|
||||||
|
pseudo-concurrently (typically in a single or a few OS-level threads)
|
||||||
and are synchronized with data exchanges on "channels".
|
and are synchronized with data exchanges on "channels".
|
||||||
|
|
||||||
%description %{_description}
|
%package devel
|
||||||
|
Summary: C development headers for python-greenlet
|
||||||
|
Group: Development/Libraries
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
%package -n python3-%{modname}
|
%description devel
|
||||||
Summary: %{summary}
|
This package contains header files required for C modules development.
|
||||||
%{?python_provide:%python_provide python3-%{modname}}
|
|
||||||
BuildRequires: python3-devel
|
|
||||||
BuildRequires: python3-setuptools
|
|
||||||
|
|
||||||
%description -n python3-%{modname} %{_description}
|
|
||||||
|
|
||||||
Python 3 version.
|
|
||||||
|
|
||||||
%package -n python3-%{modname}-devel
|
|
||||||
Summary: C development headers for python3-%{modname}
|
|
||||||
%{?python_provide:%python_provide python3-%{modname}-devel}
|
|
||||||
Requires: python3-%{modname}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
||||||
|
|
||||||
%description -n python3-%{modname}-devel
|
|
||||||
%{summary}.
|
|
||||||
|
|
||||||
Python 3 version.
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{modname}-%{version} -p1
|
%setup -q -n greenlet-%{version}
|
||||||
|
%patch1 -p1 -b .get-rid-of-ts_origin
|
||||||
|
%patch2 -p1 -b .i686_register_fixes
|
||||||
|
%patch3 -p1 -b .ppc64_support
|
||||||
|
%patch4 -p1 -b .base_exception
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py3_build
|
CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
|
||||||
|
chmod 644 benchmarks/*.py
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install
|
rm -rf %{buildroot}
|
||||||
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
# FIXME!!
|
||||||
|
# The checks segfault on ppc. So this arch
|
||||||
|
# is essentially not supported until this is fixed
|
||||||
|
%ifnarch ppc s390 s390x
|
||||||
%check
|
%check
|
||||||
%{__python3} setup.py test
|
# Run the upstream test suite:
|
||||||
|
%{__python} setup.py test
|
||||||
|
|
||||||
%files -n python3-%{modname}
|
# Run the upstream benchmarking suite to further exercise the code:
|
||||||
%license LICENSE LICENSE.PSF
|
PYTHONPATH=$(pwd) %{__python} benchmarks/chain.py
|
||||||
%doc AUTHORS NEWS README.rst
|
PYTHONPATH=$(pwd) %{__python} benchmarks/switch.py
|
||||||
%{python3_sitearch}/%{modname}-*.egg-info
|
%endif
|
||||||
%{python3_sitearch}/%{modname}*.so
|
|
||||||
|
|
||||||
%files -n python3-greenlet-devel
|
%files
|
||||||
%{_includedir}/python%{python3_version}*/%{modname}/
|
%defattr(-,root,root,-)
|
||||||
|
%doc doc/greenlet.txt README benchmarks AUTHORS NEWS
|
||||||
|
%{python_sitearch}/greenlet.so
|
||||||
|
%{python_sitearch}/greenlet*.egg-info
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_includedir}/python*/greenlet
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 0.4.14-8
|
* Fri Jan 18 2013 Pádraig Brady <P@draigBrady.com> - 0.3.1-12
|
||||||
- Rebuilt for Python 3.9
|
- Fix base exception type thrown
|
||||||
|
|
||||||
* Thu May 21 2020 Miro Hrončok <mhroncok@redhat.com> - 0.4.14-7
|
|
||||||
- Fix Python 3.9 build
|
|
||||||
|
|
||||||
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.14-6
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Sep 26 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.14-5
|
|
||||||
- Subpackages python2-greenlet, python2-greenlet-devel have been removed
|
|
||||||
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
|
||||||
|
|
||||||
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.14-4
|
|
||||||
- Rebuilt for Python 3.8
|
|
||||||
|
|
||||||
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.14-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.14-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Wed Jul 18 2018 Kevin Fenzi <kevin@scrye.com> - 0.4.14-1
|
|
||||||
- Update to 0.4.14.
|
|
||||||
- Drop upstreamed/no longer needed patches.
|
|
||||||
|
|
||||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.13-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Jul 03 2018 Miro Hrončok <mhroncok@redhat.com> - 0.4.13-4
|
|
||||||
- Add fix for Python 3.7
|
|
||||||
|
|
||||||
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 0.4.13-3
|
|
||||||
- Rebuilt for Python 3.7
|
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.13-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.13-1
|
|
||||||
- Update to 0.4.13
|
|
||||||
|
|
||||||
* Fri Jan 12 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.12-1
|
|
||||||
- Update to 0.4.12
|
|
||||||
|
|
||||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.11-5
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.11-4
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.11-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
||||||
|
|
||||||
* Tue Dec 20 2016 Miro Hrončok <mhroncok@redhat.com> - 0.4.11-2
|
|
||||||
- Rebuild for Python 3.6
|
|
||||||
|
|
||||||
* Sun Dec 11 2016 Kevin Fenzi <kevin@scrye.com> - 0.4.11-1
|
|
||||||
- Update to 0.4.11. Fixes bug #1403514
|
|
||||||
|
|
||||||
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.9-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
|
|
||||||
|
|
||||||
* Sun Oct 25 2015 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.9-1
|
|
||||||
- Update to 0.4.9
|
|
||||||
- Use %license macro
|
|
||||||
- Follow new RPM Packaging guidelines
|
|
||||||
- Cleanups in spec
|
|
||||||
|
|
||||||
* Fri Aug 21 2015 Kevin Fenzi <kevin@scrye.com> 0.4.7-2
|
|
||||||
- Re-enable tests on secondary arches. Fixes #1252899
|
|
||||||
- Applied patch to build on ppc64le. Fixes #1252900
|
|
||||||
|
|
||||||
* Fri Jun 26 2015 Kevin Fenzi <kevin@scrye.com> 0.4.7-1
|
|
||||||
- Update to 0.4.7. Fixes bug #1235896
|
|
||||||
|
|
||||||
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.5-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Mar 29 2015 Terje Røsten <terje.rosten@ntnu.no> - 0.4.5-1
|
|
||||||
- 0.4.5
|
|
||||||
- Add python3 subpackage
|
|
||||||
- Ship license files
|
|
||||||
- Some spec clean ups
|
|
||||||
- Update fixes FTBFS issue (bz#1106779)
|
|
||||||
- Add comment about issues on ppc64, s390 & s390x
|
|
||||||
|
|
||||||
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.2-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Jan 23 2014 Orion Poplawski <orion@cora.nwra.com> 0.4.2-1
|
|
||||||
- Update to 0.4.2
|
|
||||||
|
|
||||||
* Mon Aug 05 2013 Kevin Fenzi <kevin@scrye.com> 0.4.1-1
|
|
||||||
- Update to 0.4.1
|
|
||||||
- Fix FTBFS bug #993134
|
|
||||||
|
|
||||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jan 18 2013 Pádraig Brady <P@draigBrady.com> - 0.4.0-1
|
|
||||||
- Update to 0.4.0
|
|
||||||
|
|
||||||
* Thu Oct 11 2012 Pádraig Brady <P@draigBrady.com> - 0.3.1-11
|
* Thu Oct 11 2012 Pádraig Brady <P@draigBrady.com> - 0.3.1-11
|
||||||
- Add support for ppc64
|
- Add support for ppc64
|
||||||
|
Loading…
Reference in New Issue
Block a user