summaryrefslogtreecommitdiff
path: root/dev-python/greenlet
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-python/greenlet
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadbaldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-python/greenlet')
-rw-r--r--dev-python/greenlet/Manifest2
-rw-r--r--dev-python/greenlet/files/greenlet-0.4.15-Add-support-for-DEC-Alpha.patch63
-rw-r--r--dev-python/greenlet/files/greenlet-0.4.15-py39.patch48
-rw-r--r--dev-python/greenlet/greenlet-0.4.15-r1.ebuild40
-rw-r--r--dev-python/greenlet/greenlet-0.4.15.ebuild47
-rw-r--r--dev-python/greenlet/greenlet-0.4.16.ebuild35
-rw-r--r--dev-python/greenlet/metadata.xml12
7 files changed, 247 insertions, 0 deletions
diff --git a/dev-python/greenlet/Manifest b/dev-python/greenlet/Manifest
new file mode 100644
index 000000000000..03389d2ffe4c
--- /dev/null
+++ b/dev-python/greenlet/Manifest
@@ -0,0 +1,2 @@
+DIST greenlet-0.4.15.tar.gz 59694 BLAKE2B 8409e356e7724e1651606507d0d082e77f7f21b8884f304f5db55ce6ba6e56446525e3adc96743566b03bcdb9bdea7c47fd144554a7f60825cb191e19d6e177b SHA512 a3b7856aadc988fe153f5cf62552dd6219358f35ee2ca136e5eb5c9871cb7545986753af299e6b3e95877e9aa564559e95c548785f78e680766630b047a1ec89
+DIST greenlet-0.4.16.tar.gz 60576 BLAKE2B e0c53af4b6886fe00f0299a1779e478b7cbce5ff733669e8a62757cef49f034e19b7b932e7900b09e288ff4ab7e883fc2dd5f97f78c0e1b5702e5ba9c9f62fa1 SHA512 0dc473c05c1d54a830c009fe8197fd2017b8f3117532af0fc7970eb5abd93a82bbaa1a8403375a0ac7148fcff63cdc3faa663d0c5e442f3dd10ea3b2f98b306e
diff --git a/dev-python/greenlet/files/greenlet-0.4.15-Add-support-for-DEC-Alpha.patch b/dev-python/greenlet/files/greenlet-0.4.15-Add-support-for-DEC-Alpha.patch
new file mode 100644
index 000000000000..6a5b37b0e944
--- /dev/null
+++ b/dev-python/greenlet/files/greenlet-0.4.15-Add-support-for-DEC-Alpha.patch
@@ -0,0 +1,63 @@
+https://github.com/python-greenlet/greenlet/pull/160
+
+From 839dfa8d4bc4e9a0b97a1984ab2519841f5511e4 Mon Sep 17 00:00:00 2001
+From: Matt Turner <mattst88@gmail.com>
+Date: Mon, 16 Mar 2020 14:38:21 -0700
+Subject: [PATCH] Add support for DEC Alpha
+
+---
+ platform/switch_alpha_unix.h | 30 ++++++++++++++++++++++++++++++
+ slp_platformselect.h | 2 ++
+ 2 files changed, 32 insertions(+)
+ create mode 100644 platform/switch_alpha_unix.h
+
+diff --git a/platform/switch_alpha_unix.h b/platform/switch_alpha_unix.h
+new file mode 100644
+index 0000000..216619f
+--- /dev/null
++++ b/platform/switch_alpha_unix.h
+@@ -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 (
++ "addq $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 --git a/slp_platformselect.h b/slp_platformselect.h
+index bed9e6d..fb99aed 100644
+--- a/slp_platformselect.h
++++ b/slp_platformselect.h
+@@ -51,4 +51,6 @@
+ #include "platform/switch_csky_gcc.h" /* gcc on csky */
+ #elif defined(__GNUC__) && defined(__riscv)
+ #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 */
+ #endif
+--
+2.24.1
+
diff --git a/dev-python/greenlet/files/greenlet-0.4.15-py39.patch b/dev-python/greenlet/files/greenlet-0.4.15-py39.patch
new file mode 100644
index 000000000000..15cf75d32e55
--- /dev/null
+++ b/dev-python/greenlet/files/greenlet-0.4.15-py39.patch
@@ -0,0 +1,48 @@
+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);
+ }
diff --git a/dev-python/greenlet/greenlet-0.4.15-r1.ebuild b/dev-python/greenlet/greenlet-0.4.15-r1.ebuild
new file mode 100644
index 000000000000..86dbb7a7c895
--- /dev/null
+++ b/dev-python/greenlet/greenlet-0.4.15-r1.ebuild
@@ -0,0 +1,40 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Note: greenlet is built-in in pypy
+PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} )
+
+inherit distutils-r1 flag-o-matic
+
+DESCRIPTION="Lightweight in-process concurrent programming"
+HOMEPAGE="https://pypi.org/project/greenlet/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha amd64 arm arm64 -hppa -ia64 ~mips ppc ppc64 s390 ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-Add-support-for-DEC-Alpha.patch
+ "${FILESDIR}"/greenlet-0.4.15-py39.patch
+)
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+distutils_enable_sphinx doc
+
+python_compile() {
+ if ! python_is_python3; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ append-flags -fno-strict-aliasing
+ fi
+
+ distutils-r1_python_compile
+}
+
+python_test() {
+ "${PYTHON}" run-tests.py -n || die "Tests fail with ${EPYTHON}"
+}
diff --git a/dev-python/greenlet/greenlet-0.4.15.ebuild b/dev-python/greenlet/greenlet-0.4.15.ebuild
new file mode 100644
index 000000000000..0fbfb93370d8
--- /dev/null
+++ b/dev-python/greenlet/greenlet-0.4.15.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+# Note: greenlet is built-in in pypy
+PYTHON_COMPAT=( python2_7 python3_{6,7} )
+
+inherit distutils-r1 flag-o-matic
+
+DESCRIPTION="Lightweight in-process concurrent programming"
+HOMEPAGE="https://pypi.org/project/greenlet/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="-alpha amd64 arm arm64 -hppa -ia64 ~mips ppc ppc64 s390 ~sparc x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+DEPEND="
+ dev-python/setuptools[${PYTHON_USEDEP}]
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )
+"
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+python_compile() {
+ if [[ ${EPYTHON} == python2.7 ]]; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ append-flags -fno-strict-aliasing
+ fi
+
+ distutils-r1_python_compile
+}
+
+python_compile_all() {
+ use doc && emake -C doc html
+}
+
+python_test() {
+ "${PYTHON}" run-tests.py -n || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/greenlet/greenlet-0.4.16.ebuild b/dev-python/greenlet/greenlet-0.4.16.ebuild
new file mode 100644
index 000000000000..95b8ec7c7e4f
--- /dev/null
+++ b/dev-python/greenlet/greenlet-0.4.16.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# Note: greenlet is built-in in pypy
+PYTHON_COMPAT=( python2_7 python3_{6,7,8,9} )
+
+inherit distutils-r1 flag-o-matic
+
+DESCRIPTION="Lightweight in-process concurrent programming"
+HOMEPAGE="https://pypi.org/project/greenlet/"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 -hppa -ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="doc"
+
+DISTUTILS_IN_SOURCE_BUILD=1
+
+distutils_enable_sphinx doc
+
+python_compile() {
+ if ! python_is_python3; then
+ local CFLAGS=${CFLAGS} CXXFLAGS=${CXXFLAGS}
+ append-flags -fno-strict-aliasing
+ fi
+
+ distutils-r1_python_compile
+}
+
+python_test() {
+ "${PYTHON}" run-tests.py -n || die "Tests fail with ${EPYTHON}"
+}
diff --git a/dev-python/greenlet/metadata.xml b/dev-python/greenlet/metadata.xml
new file mode 100644
index 000000000000..365b4acd2dfb
--- /dev/null
+++ b/dev-python/greenlet/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">greenlet</remote-id>
+ </upstream>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>