* [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/, dev-python/cython/files/
@ 2021-05-15 0:36 Marek Szuba
0 siblings, 0 replies; 8+ messages in thread
From: Marek Szuba @ 2021-05-15 0:36 UTC (permalink / raw
To: gentoo-commits
commit: 3c2955b86d47c5ad95e40295f2b400af491eed6b
Author: Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Sat May 15 00:34:54 2021 +0000
Commit: Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Sat May 15 00:36:35 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c2955b8
dev-python/cython: adapt IndentationError test to python3_10
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>
dev-python/cython/cython-0.29.23.ebuild | 1 +
.../files/cython-0.29.23-test_exceptions-py310.patch | 14 ++++++++++++++
2 files changed, 15 insertions(+)
diff --git a/dev-python/cython/cython-0.29.23.ebuild b/dev-python/cython/cython-0.29.23.ebuild
index d091b7190eb..ef4189bc3f4 100644
--- a/dev-python/cython/cython-0.29.23.ebuild
+++ b/dev-python/cython/cython-0.29.23.ebuild
@@ -32,6 +32,7 @@ BDEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/${PN}-0.29.14-sphinx-update.patch"
"${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
+ "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
"${FILESDIR}/${PN}-0.29.23-tracing-py310.patch"
)
diff --git a/dev-python/cython/files/cython-0.29.23-test_exceptions-py310.patch b/dev-python/cython/files/cython-0.29.23-test_exceptions-py310.patch
new file mode 100644
index 00000000000..0c9fb2c9ea5
--- /dev/null
+++ b/dev-python/cython/files/cython-0.29.23-test_exceptions-py310.patch
@@ -0,0 +1,14 @@
+--- a/tests/run/test_exceptions.pyx
++++ b/tests/run/test_exceptions.pyx
+@@ -188,7 +188,10 @@
+
+ # should not apply to subclasses, see issue #31161
+ s = '''if True:\nprint "No indent"'''
+- ckmsg(s, "expected an indented block", IndentationError)
++ if sys.version_info >= (3, 10):
++ ckmsg(s, "expected an indented block after 'if' statement on line 1", IndentationError)
++ else:
++ ckmsg(s, "expected an indented block", IndentationError)
+
+ s = '''if True:\n print()\n\texec "mixed tabs and spaces"'''
+ ckmsg(s, "inconsistent use of tabs and spaces in indentation", TabError)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/, dev-python/cython/files/
@ 2024-03-10 17:10 Michał Górny
0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2024-03-10 17:10 UTC (permalink / raw
To: gentoo-commits
commit: a8e44050e3ab2370f468e9ff92f0e31ee63eea20
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 10 16:46:53 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Mar 10 17:10:36 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a8e44050
dev-python/cython: Remove old
Closes: https://bugs.gentoo.org/897934
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/cython/Manifest | 2 -
dev-python/cython/cython-0.29.36.ebuild | 94 ---------------------
dev-python/cython/cython-0.29.37.1-r1.ebuild | 97 ----------------------
dev-python/cython/files/50cython-gentoo.el | 11 ---
.../files/cython-0.29.37.1-no-warn-ptr-types.patch | 14 ----
.../cython/files/cython-3.0.2-enummeta.patch | 69 ---------------
.../files/cython-3.0.8-no-warn-ptr-types.patch | 14 ----
7 files changed, 301 deletions(-)
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
index e2826321b968..1eda2530ba4a 100644
--- a/dev-python/cython/Manifest
+++ b/dev-python/cython/Manifest
@@ -1,4 +1,2 @@
-DIST cython-0.29.36.gh.tar.gz 2115333 BLAKE2B 6d43779c7222ff65d7de3a35ec18ef636480807d53480a8f94cc8c92d462fcc2f4d201a3bbf6e840a11fd33025e32c53f85626b05c131d10eed2859cdca7eb2d SHA512 a086fe1a11290cd3c870b891e61a0a0e2595bab9c26888024a758b6950c07059346d682fa9349e46c0af89805abbdd750059b3189960b8ce18007dfb5eb4391a
-DIST cython-0.29.37.1.gh.tar.gz 2115631 BLAKE2B b81e527ee1da7d16d074102378b531e4b0c161a3d66e47df46b624b02464cbd5c3d08d0e32f8175d56807ed8c6603108b85953db9f51892cfdf8952b4d287399 SHA512 6038499f13914b8a1957eee4d04e0499f448c89c3d519320e5218bf518aacb7d345f3c48614839222eaee016edf549b719520500b0088d28163635a74d35f3c6
DIST cython-3.0.8.gh.tar.gz 2764668 BLAKE2B 03202ea480fa398d2b0893cc96185467009c783cf4451fc5d1c09ec229398bc084276680ed2b64acf63253744f827427e03674be3e5985d5a2912d9f338c786a SHA512 1070fc278401990595d177b0e6396bc1eba2ea8234a7c5bb26399b6b7284de7791ee5fa60ef74d06d0f4120b9c877bfd7703a7d701838f1634737526c614b860
DIST cython-3.0.9.gh.tar.gz 2769345 BLAKE2B 2a21b5e7060727d727902a08d7e038dacc047b724ebaa496ba5768542e28eec3c6198062ac3dd774a4321204752b373516f193f01bc6951e5f38b6029754647e SHA512 7899474882faab14716973783bbb46b981eab48192791acbbd06133efee83bfa9ace0e9a0272b0a44061a95ed94cdceaa98c4100f843220f5987791e36fa00e6
diff --git a/dev-python/cython/cython-0.29.36.ebuild b/dev-python/cython/cython-0.29.36.ebuild
deleted file mode 100644
index dd3557e5daef..000000000000
--- a/dev-python/cython/cython-0.29.36.ebuild
+++ /dev/null
@@ -1,94 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_TESTED=( python3_{10..11} )
-# 3.12 not tested yet for https://github.com/cython/cython/issues/5285.
-PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_12 pypy3 )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1 multiprocessing toolchain-funcs elisp-common
-
-DESCRIPTION="A Python to C compiler"
-HOMEPAGE="
- https://cython.org/
- https://github.com/cython/cython/
- https://pypi.org/project/Cython/
-"
-SRC_URI="
- https://github.com/cython/cython/archive/${PV}.tar.gz
- -> ${P}.gh.tar.gz
-"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-IUSE="emacs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- emacs? ( >=app-editors/emacs-23.1:* )
-"
-BDEPEND="
- ${RDEPEND}
- test? (
- $(python_gen_cond_dep '
- dev-python/numpy[${PYTHON_USEDEP}]
- ' "${PYTHON_TESTED[@]}")
- )
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
- "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
- "${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch"
-)
-
-SITEFILE=50cython-gentoo.el
-
-distutils_enable_sphinx docs
-
-python_compile() {
- # Python gets confused when it is in sys.path before build.
- local -x PYTHONPATH=
-
- distutils-r1_python_compile
-}
-
-python_compile_all() {
- use emacs && elisp-compile Tools/cython-mode.el
-}
-
-python_test() {
- if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
- einfo "Skipping tests on ${EPYTHON} (xfail)"
- return
- fi
-
- tc-export CC
- # https://github.com/cython/cython/issues/1911
- local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
- "${PYTHON}" runtests.py -vv -j "$(makeopts_jobs)" --work-dir "${BUILD_DIR}"/tests ||
- die "Tests fail with ${EPYTHON}"
-}
-
-python_install_all() {
- local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
- distutils-r1_python_install_all
-
- if use emacs; then
- elisp-install ${PN} Tools/cython-mode.*
- elisp-site-file-install "${FILESDIR}/${SITEFILE}"
- fi
-}
-
-pkg_postinst() {
- use emacs && elisp-site-regen
-}
-
-pkg_postrm() {
- use emacs && elisp-site-regen
-}
diff --git a/dev-python/cython/cython-0.29.37.1-r1.ebuild b/dev-python/cython/cython-0.29.37.1-r1.ebuild
deleted file mode 100644
index 1f809900d005..000000000000
--- a/dev-python/cython/cython-0.29.37.1-r1.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_EXT=1
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_TESTED=( python3_{10..11} )
-# 3.12 not tested yet for https://github.com/cython/cython/issues/5285.
-PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_12 pypy3 )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1 multiprocessing toolchain-funcs elisp-common
-
-DESCRIPTION="A Python to C compiler"
-HOMEPAGE="
- https://cython.org/
- https://github.com/cython/cython/
- https://pypi.org/project/Cython/
-"
-SRC_URI="
- https://github.com/cython/cython/archive/${PV}.tar.gz
- -> ${P}.gh.tar.gz
-"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-IUSE="emacs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- emacs? ( >=app-editors/emacs-23.1:* )
-"
-BDEPEND="
- ${RDEPEND}
- test? (
- $(python_gen_cond_dep '
- dev-python/numpy[${PYTHON_USEDEP}]
- ' "${PYTHON_TESTED[@]}")
- )
-"
-
-PATCHES=(
- "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
- "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
- "${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch"
- # workaround for https://bugs.gentoo.org/918983
- # https://github.com/cython/cython/issues/2747
- "${FILESDIR}/${PN}-0.29.37.1-no-warn-ptr-types.patch"
-)
-
-SITEFILE=50cython-gentoo.el
-
-distutils_enable_sphinx docs
-
-python_compile() {
- # Python gets confused when it is in sys.path before build.
- local -x PYTHONPATH=
-
- distutils-r1_python_compile
-}
-
-python_compile_all() {
- use emacs && elisp-compile Tools/cython-mode.el
-}
-
-python_test() {
- if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
- einfo "Skipping tests on ${EPYTHON} (xfail)"
- return
- fi
-
- tc-export CC
- # https://github.com/cython/cython/issues/1911
- local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
- "${PYTHON}" runtests.py -vv -j "$(makeopts_jobs)" --work-dir "${BUILD_DIR}"/tests ||
- die "Tests fail with ${EPYTHON}"
-}
-
-python_install_all() {
- local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
- distutils-r1_python_install_all
-
- if use emacs; then
- elisp-install ${PN} Tools/cython-mode.*
- elisp-site-file-install "${FILESDIR}/${SITEFILE}"
- fi
-}
-
-pkg_postinst() {
- use emacs && elisp-site-regen
-}
-
-pkg_postrm() {
- use emacs && elisp-site-regen
-}
diff --git a/dev-python/cython/files/50cython-gentoo.el b/dev-python/cython/files/50cython-gentoo.el
deleted file mode 100644
index e6dcc6a6d7fb..000000000000
--- a/dev-python/cython/files/50cython-gentoo.el
+++ /dev/null
@@ -1,11 +0,0 @@
-;;; site-lisp configuration for cython-mode
-
-(add-to-list 'load-path "@SITELISP@")
-
-(autoload 'cython-mode "cython-mode" "Major mode for editing Cython files" t)
-;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.pyx\\'" . cython-mode))
-;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.pxd\\'" . cython-mode))
-;;;###autoload
-(add-to-list 'auto-mode-alist '("\\.pxi\\'" . cython-mode))
diff --git a/dev-python/cython/files/cython-0.29.37.1-no-warn-ptr-types.patch b/dev-python/cython/files/cython-0.29.37.1-no-warn-ptr-types.patch
deleted file mode 100644
index b7a9d19a248d..000000000000
--- a/dev-python/cython/files/cython-0.29.37.1-no-warn-ptr-types.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
-index e9bfa9fe9..43be47dd5 100644
---- a/Cython/Compiler/ModuleNode.py
-+++ b/Cython/Compiler/ModuleNode.py
-@@ -376,6 +376,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
- self.generate_includes(env, modules, code, early=False)
-
- code = globalstate['all_the_rest']
-+ # Gentoo: workaround for https://github.com/cython/cython/issues/2747
-+ # https://bugs.gentoo.org/918983
-+ code.putln('#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"')
-
- self.generate_cached_builtins_decls(env, code)
- self.generate_lambda_definitions(env, code)
diff --git a/dev-python/cython/files/cython-3.0.2-enummeta.patch b/dev-python/cython/files/cython-3.0.2-enummeta.patch
deleted file mode 100644
index 284af4ac6c16..000000000000
--- a/dev-python/cython/files/cython-3.0.2-enummeta.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 81cc077ad035947a3429c245f1e28c8b43c6dcc6 Mon Sep 17 00:00:00 2001
-From: da-woods <dw-git@d-woods.co.uk>
-Date: Sat, 2 Sep 2023 10:32:59 +0100
-Subject: [PATCH] Fix invalid fastcall dict when keywords are passed
-
-Fixes #5665
-
-I'm slightly surprised this hasn't caused more bugs. We're passing
-a dict where we should be passing a tuple of names.
-
-Replacement should hopefully be right, but I don't know how
-optimized or otherwise it is.
----
- Cython/Utility/ObjectHandling.c | 36 +++++++++++++++++++--------------
- 1 file changed, 21 insertions(+), 15 deletions(-)
-
-diff --git a/Cython/Utility/ObjectHandling.c b/Cython/Utility/ObjectHandling.c
-index 8ea5be42935..507fb94f605 100644
---- a/Cython/Utility/ObjectHandling.c
-+++ b/Cython/Utility/ObjectHandling.c
-@@ -2328,27 +2328,33 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObj
- #endif
- #endif
-
-- #if CYTHON_VECTORCALL
-- #if Py_VERSION_HEX < 0x03090000
-- vectorcallfunc f = _PyVectorcall_Function(func);
-- #else
-- vectorcallfunc f = PyVectorcall_Function(func);
-- #endif
-- if (f) {
-- return f(func, args, (size_t)nargs, kwargs);
-- }
-- #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
-- // exclude fused functions for now
-- if (__Pyx_CyFunction_CheckExact(func)) {
-- __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
-- if (f) return f(func, args, (size_t)nargs, kwargs);
-+ if (kwargs == NULL) {
-+ #if CYTHON_VECTORCALL
-+ #if Py_VERSION_HEX < 0x03090000
-+ vectorcallfunc f = _PyVectorcall_Function(func);
-+ #else
-+ vectorcallfunc f = PyVectorcall_Function(func);
-+ #endif
-+ if (f) {
-+ return f(func, args, (size_t)nargs, NULL);
-+ }
-+ #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
-+ // exclude fused functions for now
-+ if (__Pyx_CyFunction_CheckExact(func)) {
-+ __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
-+ if (f) return f(func, args, (size_t)nargs, NULL);
-+ }
-+ #endif
- }
-- #endif
-
- if (nargs == 0) {
- return __Pyx_PyObject_Call(func, $empty_tuple, kwargs);
- }
-+ #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
-+ return PyObject_VectorcallDict(func, args, nargs, kwargs);
-+ #else
- return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
-+ #endif
- }
-
-
diff --git a/dev-python/cython/files/cython-3.0.8-no-warn-ptr-types.patch b/dev-python/cython/files/cython-3.0.8-no-warn-ptr-types.patch
deleted file mode 100644
index bfa51fd2bf5c..000000000000
--- a/dev-python/cython/files/cython-3.0.8-no-warn-ptr-types.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
-index b46b6cee6..9f9f08d61 100644
---- a/Cython/Compiler/ModuleNode.py
-+++ b/Cython/Compiler/ModuleNode.py
-@@ -507,6 +507,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
- self.generate_includes(env, modules, code, early=False)
-
- code = globalstate['module_code']
-+ # Gentoo: workaround for https://github.com/cython/cython/issues/2747
-+ # https://bugs.gentoo.org/918983
-+ code.putln('#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"')
-
- self.generate_cached_builtins_decls(env, code)
-
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/, dev-python/cython/files/
@ 2024-02-27 19:29 Michał Górny
0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2024-02-27 19:29 UTC (permalink / raw
To: gentoo-commits
commit: 2baca90c01517c944bb243f7acef2fec9e9089c3
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 27 12:20:47 2024 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue Feb 27 19:29:15 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2baca90c
dev-python/cython: Add a hack for -Werror=incompatible-pointer-types
Bug: https://bugs.gentoo.org/918983
Bug: https://github.com/cython/cython/issues/2747
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/cython/cython-0.29.37.1-r1.ebuild | 97 ++++++++++++++++++++++
dev-python/cython/cython-3.0.8-r1.ebuild | 87 +++++++++++++++++++
.../files/cython-0.29.37.1-no-warn-ptr-types.patch | 14 ++++
.../files/cython-3.0.8-no-warn-ptr-types.patch | 14 ++++
4 files changed, 212 insertions(+)
diff --git a/dev-python/cython/cython-0.29.37.1-r1.ebuild b/dev-python/cython/cython-0.29.37.1-r1.ebuild
new file mode 100644
index 000000000000..1f809900d005
--- /dev/null
+++ b/dev-python/cython/cython-0.29.37.1-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_TESTED=( python3_{10..11} )
+# 3.12 not tested yet for https://github.com/cython/cython/issues/5285.
+PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" python3_12 pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 multiprocessing toolchain-funcs elisp-common
+
+DESCRIPTION="A Python to C compiler"
+HOMEPAGE="
+ https://cython.org/
+ https://github.com/cython/cython/
+ https://pypi.org/project/Cython/
+"
+SRC_URI="
+ https://github.com/cython/cython/archive/${PV}.tar.gz
+ -> ${P}.gh.tar.gz
+"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="emacs test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+ emacs? ( >=app-editors/emacs-23.1:* )
+"
+BDEPEND="
+ ${RDEPEND}
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/numpy[${PYTHON_USEDEP}]
+ ' "${PYTHON_TESTED[@]}")
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
+ "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
+ "${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch"
+ # workaround for https://bugs.gentoo.org/918983
+ # https://github.com/cython/cython/issues/2747
+ "${FILESDIR}/${PN}-0.29.37.1-no-warn-ptr-types.patch"
+)
+
+SITEFILE=50cython-gentoo.el
+
+distutils_enable_sphinx docs
+
+python_compile() {
+ # Python gets confused when it is in sys.path before build.
+ local -x PYTHONPATH=
+
+ distutils-r1_python_compile
+}
+
+python_compile_all() {
+ use emacs && elisp-compile Tools/cython-mode.el
+}
+
+python_test() {
+ if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
+ einfo "Skipping tests on ${EPYTHON} (xfail)"
+ return
+ fi
+
+ tc-export CC
+ # https://github.com/cython/cython/issues/1911
+ local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
+ "${PYTHON}" runtests.py -vv -j "$(makeopts_jobs)" --work-dir "${BUILD_DIR}"/tests ||
+ die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
+ distutils-r1_python_install_all
+
+ if use emacs; then
+ elisp-install ${PN} Tools/cython-mode.*
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}
diff --git a/dev-python/cython/cython-3.0.8-r1.ebuild b/dev-python/cython/cython-3.0.8-r1.ebuild
new file mode 100644
index 000000000000..7fe363918971
--- /dev/null
+++ b/dev-python/cython/cython-3.0.8-r1.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_EXT=1
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_TESTED=( python3_{10..12} )
+PYTHON_COMPAT=( "${PYTHON_TESTED[@]}" pypy3 )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 multiprocessing toolchain-funcs
+
+MY_P=${P/_rc/rc}
+DESCRIPTION="A Python to C compiler"
+HOMEPAGE="
+ https://cython.org/
+ https://github.com/cython/cython/
+ https://pypi.org/project/Cython/
+"
+SRC_URI="
+ https://github.com/cython/cython/archive/${PV/_rc/rc}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ ${RDEPEND}
+ test? (
+ $(python_gen_cond_dep '
+ dev-python/numpy[${PYTHON_USEDEP}]
+ ' "${PYTHON_TESTED[@]}")
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
+ "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
+ "${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch"
+ # workaround for https://bugs.gentoo.org/918983
+ # https://github.com/cython/cython/issues/2747
+ "${FILESDIR}/${PN}-3.0.8-no-warn-ptr-types.patch"
+)
+
+distutils_enable_sphinx docs \
+ dev-python/jinja \
+ dev-python/sphinx-issues \
+ dev-python/sphinx-tabs
+
+python_compile() {
+ # Python gets confused when it is in sys.path before build.
+ local -x PYTHONPATH=
+
+ distutils-r1_python_compile
+}
+
+python_test() {
+ if ! has "${EPYTHON/./_}" "${PYTHON_TESTED[@]}"; then
+ einfo "Skipping tests on ${EPYTHON} (xfail)"
+ return
+ fi
+
+ # Needed to avoid confusing cache tests
+ unset CYTHON_FORCE_REGEN
+
+ tc-export CC
+ # https://github.com/cython/cython/issues/1911
+ local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
+ "${PYTHON}" runtests.py \
+ -vv \
+ -j "$(makeopts_jobs)" \
+ --work-dir "${BUILD_DIR}"/tests \
+ --no-examples \
+ --no-code-style \
+ || die "Tests fail with ${EPYTHON}"
+}
+
+python_install_all() {
+ local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
+ distutils-r1_python_install_all
+}
diff --git a/dev-python/cython/files/cython-0.29.37.1-no-warn-ptr-types.patch b/dev-python/cython/files/cython-0.29.37.1-no-warn-ptr-types.patch
new file mode 100644
index 000000000000..b7a9d19a248d
--- /dev/null
+++ b/dev-python/cython/files/cython-0.29.37.1-no-warn-ptr-types.patch
@@ -0,0 +1,14 @@
+diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
+index e9bfa9fe9..43be47dd5 100644
+--- a/Cython/Compiler/ModuleNode.py
++++ b/Cython/Compiler/ModuleNode.py
+@@ -376,6 +376,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
+ self.generate_includes(env, modules, code, early=False)
+
+ code = globalstate['all_the_rest']
++ # Gentoo: workaround for https://github.com/cython/cython/issues/2747
++ # https://bugs.gentoo.org/918983
++ code.putln('#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"')
+
+ self.generate_cached_builtins_decls(env, code)
+ self.generate_lambda_definitions(env, code)
diff --git a/dev-python/cython/files/cython-3.0.8-no-warn-ptr-types.patch b/dev-python/cython/files/cython-3.0.8-no-warn-ptr-types.patch
new file mode 100644
index 000000000000..bfa51fd2bf5c
--- /dev/null
+++ b/dev-python/cython/files/cython-3.0.8-no-warn-ptr-types.patch
@@ -0,0 +1,14 @@
+diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
+index b46b6cee6..9f9f08d61 100644
+--- a/Cython/Compiler/ModuleNode.py
++++ b/Cython/Compiler/ModuleNode.py
+@@ -507,6 +507,9 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
+ self.generate_includes(env, modules, code, early=False)
+
+ code = globalstate['module_code']
++ # Gentoo: workaround for https://github.com/cython/cython/issues/2747
++ # https://bugs.gentoo.org/918983
++ code.putln('#pragma GCC diagnostic ignored "-Wincompatible-pointer-types"')
+
+ self.generate_cached_builtins_decls(env, code)
+
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/, dev-python/cython/files/
@ 2023-06-04 14:03 Michał Górny
0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2023-06-04 14:03 UTC (permalink / raw
To: gentoo-commits
commit: a90a245bdb7fdda146d41ccbd221c9df973bc18a
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 4 13:49:36 2023 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jun 4 14:02:58 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a90a245b
dev-python/cython: Backport py3.12 fix needed for pysimdjson
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
...0_beta3.ebuild => cython-3.0.0_beta3-r1.ebuild} | 2 ++
.../files/cython-3.0.0_beta3-py312-long.patch | 28 ++++++++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/dev-python/cython/cython-3.0.0_beta3.ebuild b/dev-python/cython/cython-3.0.0_beta3-r1.ebuild
similarity index 94%
rename from dev-python/cython/cython-3.0.0_beta3.ebuild
rename to dev-python/cython/cython-3.0.0_beta3-r1.ebuild
index 4637fee3bed8..ca84314058cc 100644
--- a/dev-python/cython/cython-3.0.0_beta3.ebuild
+++ b/dev-python/cython/cython-3.0.0_beta3-r1.ebuild
@@ -43,6 +43,8 @@ PATCHES=(
"${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
"${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
"${FILESDIR}/${PN}-0.29.23-pythran-parallel-install.patch"
+ # backport upstream fix e.g. for dev-python/pysimdjson on py3.12
+ "${FILESDIR}/${P}-py312-long.patch"
)
distutils_enable_sphinx docs \
diff --git a/dev-python/cython/files/cython-3.0.0_beta3-py312-long.patch b/dev-python/cython/files/cython-3.0.0_beta3-py312-long.patch
new file mode 100644
index 000000000000..fb849eca8666
--- /dev/null
+++ b/dev-python/cython/files/cython-3.0.0_beta3-py312-long.patch
@@ -0,0 +1,28 @@
+From d82e4e34582e908d315b912a60d81d5759850df5 Mon Sep 17 00:00:00 2001
+From: Stefan Behnel <stefan_ml@behnel.de>
+Date: Mon, 29 May 2023 21:58:15 +0200
+Subject: [PATCH] Fix the argument type passed into the new
+ "PyUnstable_Long_Compact*()" C-API functions in CPython 3.12.
+
+---
+ Cython/Utility/TypeConversion.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Cython/Utility/TypeConversion.c b/Cython/Utility/TypeConversion.c
+index efc5c1373..09e87d81c 100644
+--- a/Cython/Utility/TypeConversion.c
++++ b/Cython/Utility/TypeConversion.c
+@@ -149,8 +149,8 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
+ ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
+
+ #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
+- #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact(x)
+- #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue(x)
++ #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
++ #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
+ #else
+ #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
+ #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
+--
+2.41.0
+
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/, dev-python/cython/files/
@ 2022-01-08 16:56 Michał Górny
0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2022-01-08 16:56 UTC (permalink / raw
To: gentoo-commits
commit: 0c2ae63fd808a11c3d2b76b25db9537e924e90c7
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 8 16:54:57 2022 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sat Jan 8 16:54:57 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c2ae63f
dev-python/cython: Remove old
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
dev-python/cython/Manifest | 3 -
dev-python/cython/cython-0.29.21.ebuild | 81 --------
dev-python/cython/cython-0.29.23.ebuild | 78 --------
dev-python/cython/cython-0.29.24-r1.ebuild | 77 --------
.../files/cython-0.29.14-sphinx-update.patch | 13 --
.../cython-0.29.21-spawn-multiprocessing.patch | 29 ---
.../files/cython-0.29.23-tracing-py310.patch | 213 ---------------------
.../cython-0.29.24-test-failure-warning.patch | 20 --
.../files/cython-0.29.24-unaligned-format.patch | 33 ----
9 files changed, 547 deletions(-)
diff --git a/dev-python/cython/Manifest b/dev-python/cython/Manifest
index 94d3b6198bde..deb61b54af02 100644
--- a/dev-python/cython/Manifest
+++ b/dev-python/cython/Manifest
@@ -1,5 +1,2 @@
-DIST cython-0.29.21.gh.tar.gz 2088511 BLAKE2B 7a4ddabb65a519d3c71454ac8417438a3a9c46b47489c18e7c7e82ffcb5d5f2f0c5246d0b364f8317d374c53f0c83844c73c7d2ef6b9f75f10707aaf2931ce41 SHA512 2c0c3e3fff07106eb98862f71cd5dec9ff29460cf9b9e4de74537ca5e033f7523989beb5fbdc14723beaf94a535976f75c803e791b87e017961d9694b8c37679
-DIST cython-0.29.23.gh.tar.gz 2093463 BLAKE2B c710b9bc9e05e0030dff3098857b349564fd167f7d9c47e2ef4e8897e072f67497b8ed3994f45135c21f8b2bf3a2cff016fec9a808b2bbe9712174dd0a6b1a3e SHA512 093b7a1d5c68f6e2d2b9b8adb9ac99e8967ddd0a66c0513a78e88bd55d96533dd8352b2478554fb53bf32a72d730967fb08ccb2eaa462da68f86891dceb4925a
-DIST cython-0.29.24.gh.tar.gz 2097245 BLAKE2B 9f5f2da0aed61d7fda2e14ea0669a2dd187cd053f3b82621342c7be29e26ff581b673a32e43bacd5c0df3e515f250eb23a64b1dae8911132fdca48175910a3dc SHA512 387a827f3cb7428248019744e3ed606a133d98ac882b83624d24ae0fdf8a8f2334978555d7d84e5cc4adaf715c541fef64e45bcbdda85ca33473c21f99360be8
DIST cython-0.29.25.gh.tar.gz 2100012 BLAKE2B 497c2550c870c808f1c972d3e9ffedd6672544b9976653faac4a4125008e4472ae5a2e0db0510c8b2c5fd11f73a5885e0e4394bbce2f1327b7610bf59b64f640 SHA512 1d655bb4de8bd3480bcd579c32cd0e5bfc5cfc3d966d3d892b98cc86f59c9bd0522066c4c5dbc4c6abeb3ebe3fcd3f49ec873dd724f9ad04976635f652fdf9e3
DIST cython-0.29.26.gh.tar.gz 2100616 BLAKE2B 9990d8fd14a8042b1a27a4f60fcc8f6d4be42a1e475f0e5d37bc6c60439ca00a1a70b49ab708ad2dfac5184a62c25d75f27ff158ef7f0df9132355c570a9aac6 SHA512 936449dd0031c2e2baeb4402a448d632324c1b66bf062ae0e632cf63dc27556607efb8446e8f913253b761627d3946283c2a60fdcad8c2434e1601fe4b0fb60e
diff --git a/dev-python/cython/cython-0.29.21.ebuild b/dev-python/cython/cython-0.29.21.ebuild
deleted file mode 100644
index bb017b7e2557..000000000000
--- a/dev-python/cython/cython-0.29.21.ebuild
+++ /dev/null
@@ -1,81 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python3_{7,8,9} pypy3 )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1 toolchain-funcs elisp-common
-
-DESCRIPTION="A Python to C compiler"
-HOMEPAGE="https://cython.org https://pypi.org/project/Cython/
- https://github.com/cython/cython"
-SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
-IUSE="emacs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- emacs? ( >=app-editors/emacs-23.1:* )
-"
-BDEPEND="${RDEPEND}
- test? (
- $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \
- python3_{6,7,8})
- )"
-
-PATCHES=(
- "${FILESDIR}/cython-0.29.14-sphinx-update.patch"
- "${FILESDIR}/cython-0.29.21-spawn-multiprocessing.patch"
-)
-
-SITEFILE=50cython-gentoo.el
-
-distutils_enable_sphinx docs
-
-python_compile() {
- if ! python_is_python3; then
- local CFLAGS="${CFLAGS} -fno-strict-aliasing"
- local CXXFLAGS="${CXXFLAGS} -fno-strict-aliasing"
- fi
-
- # Python gets confused when it is in sys.path before build.
- local -x PYTHONPATH=
-
- distutils-r1_python_compile
-}
-
-python_compile_all() {
- use emacs && elisp-compile Tools/cython-mode.el
-}
-
-python_test() {
- tc-export CC
- # https://github.com/cython/cython/issues/1911
- local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
- "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \
- || die "Tests fail with ${EPYTHON}"
-}
-
-python_install_all() {
- local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
- distutils-r1_python_install_all
-
- if use emacs; then
- elisp-install ${PN} Tools/cython-mode.*
- elisp-site-file-install "${FILESDIR}/${SITEFILE}"
- fi
-}
-
-pkg_postinst() {
- use emacs && elisp-site-regen
-}
-
-pkg_postrm() {
- use emacs && elisp-site-regen
-}
diff --git a/dev-python/cython/cython-0.29.23.ebuild b/dev-python/cython/cython-0.29.23.ebuild
deleted file mode 100644
index bce6983a00f2..000000000000
--- a/dev-python/cython/cython-0.29.23.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-DISTUTILS_USE_SETUPTOOLS=rdepend
-PYTHON_COMPAT=( python3_{7..10} pypy3 )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1 toolchain-funcs elisp-common
-
-DESCRIPTION="A Python to C compiler"
-HOMEPAGE="https://cython.org https://pypi.org/project/Cython/
- https://github.com/cython/cython"
-SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 ~riscv ~s390 ~sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
-IUSE="emacs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- emacs? ( >=app-editors/emacs-23.1:* )
-"
-BDEPEND="${RDEPEND}
- test? (
- $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \
- 'python3*')
- )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-0.29.14-sphinx-update.patch"
- "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
- "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
- "${FILESDIR}/${PN}-0.29.23-tracing-py310.patch"
-)
-
-SITEFILE=50cython-gentoo.el
-
-distutils_enable_sphinx docs
-
-python_compile() {
- # Python gets confused when it is in sys.path before build.
- local -x PYTHONPATH=
-
- distutils-r1_python_compile
-}
-
-python_compile_all() {
- use emacs && elisp-compile Tools/cython-mode.el
-}
-
-python_test() {
- tc-export CC
- # https://github.com/cython/cython/issues/1911
- local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
- "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests \
- || die "Tests fail with ${EPYTHON}"
-}
-
-python_install_all() {
- local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
- distutils-r1_python_install_all
-
- if use emacs; then
- elisp-install ${PN} Tools/cython-mode.*
- elisp-site-file-install "${FILESDIR}/${SITEFILE}"
- fi
-}
-
-pkg_postinst() {
- use emacs && elisp-site-regen
-}
-
-pkg_postrm() {
- use emacs && elisp-site-regen
-}
diff --git a/dev-python/cython/cython-0.29.24-r1.ebuild b/dev-python/cython/cython-0.29.24-r1.ebuild
deleted file mode 100644
index f613ee176918..000000000000
--- a/dev-python/cython/cython-0.29.24-r1.ebuild
+++ /dev/null
@@ -1,77 +0,0 @@
-# Copyright 1999-2021 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{7..10} pypy3 )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1 toolchain-funcs elisp-common
-
-DESCRIPTION="A Python to C compiler"
-HOMEPAGE="https://cython.org https://pypi.org/project/Cython/
- https://github.com/cython/cython"
-SRC_URI="https://github.com/cython/cython/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris ~x86-solaris"
-IUSE="emacs test"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
- emacs? ( >=app-editors/emacs-23.1:* )
-"
-BDEPEND="${RDEPEND}
- test? (
- $(python_gen_cond_dep 'dev-python/numpy[${PYTHON_USEDEP}]' \
- 'python3*')
- )"
-
-PATCHES=(
- "${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
- "${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
- "${FILESDIR}/${PN}-0.29.24-unaligned-format.patch"
- "${FILESDIR}/${PN}-0.29.24-test-failure-warning.patch"
-)
-
-SITEFILE=50cython-gentoo.el
-
-distutils_enable_sphinx docs
-
-python_compile() {
- # Python gets confused when it is in sys.path before build.
- local -x PYTHONPATH=
-
- distutils-r1_python_compile
-}
-
-python_compile_all() {
- use emacs && elisp-compile Tools/cython-mode.el
-}
-
-python_test() {
- tc-export CC
- # https://github.com/cython/cython/issues/1911
- local -x CFLAGS="${CFLAGS} -fno-strict-overflow"
- "${PYTHON}" runtests.py -vv --work-dir "${BUILD_DIR}"/tests ||
- die "Tests fail with ${EPYTHON}"
-}
-
-python_install_all() {
- local DOCS=( CHANGES.rst README.rst ToDo.txt USAGE.txt )
- distutils-r1_python_install_all
-
- if use emacs; then
- elisp-install ${PN} Tools/cython-mode.*
- elisp-site-file-install "${FILESDIR}/${SITEFILE}"
- fi
-}
-
-pkg_postinst() {
- use emacs && elisp-site-regen
-}
-
-pkg_postrm() {
- use emacs && elisp-site-regen
-}
diff --git a/dev-python/cython/files/cython-0.29.14-sphinx-update.patch b/dev-python/cython/files/cython-0.29.14-sphinx-update.patch
deleted file mode 100644
index 3f426754f6f1..000000000000
--- a/dev-python/cython/files/cython-0.29.14-sphinx-update.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/docs/conf.py b/docs/conf.py
-index 10662e28c..a84e0b928 100644
---- a/docs/conf.py
-+++ b/docs/conf.py
-@@ -41,7 +41,7 @@ highlight_language = 'cython'
- extensions = [
- 'ipython_console_highlighting',
- 'cython_highlighting',
-- 'sphinx.ext.pngmath',
-+ 'sphinx.ext.imgmath',
- 'sphinx.ext.todo',
- 'sphinx.ext.intersphinx',
- 'sphinx.ext.autodoc'
diff --git a/dev-python/cython/files/cython-0.29.21-spawn-multiprocessing.patch b/dev-python/cython/files/cython-0.29.21-spawn-multiprocessing.patch
deleted file mode 100644
index 0aa7212b9a34..000000000000
--- a/dev-python/cython/files/cython-0.29.21-spawn-multiprocessing.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Needed to prevent a loop while calling cythonize on macOS - or any platform
-defaulting to the 'spawn' method, as Python 3.8 does on Darwin.
-
-https://github.com/cython/cython/pull/3263
-From 15ae78bb74a856836dd64828326f4f0812d36520 Mon Sep 17 00:00:00 2001
-From: Marcel Bargull <marcel.bargull@udo.edu>
-Date: Fri, 6 Dec 2019 18:21:19 +0100
-Subject: [PATCH] Disable parallel cythonization for "spawn" start method.
-
----
- Cython/Build/Dependencies.py | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/Cython/Build/Dependencies.py b/Cython/Build/Dependencies.py
-index 593e00a6ef..f9b9c15bc5 100644
---- a/Cython/Build/Dependencies.py
-+++ b/Cython/Build/Dependencies.py
-@@ -1073,6 +1073,11 @@ def copy_to_build_dir(filepath, root=os.getcwd()):
-
- if N <= 1:
- nthreads = 0
-+ if nthreads:
-+ import multiprocessing
-+ if multiprocessing.get_start_method() == 'spawn':
-+ print('Disabling parallel cythonization for "spawn" process start method.')
-+ nthreads = 0
- if nthreads:
- import multiprocessing
- pool = multiprocessing.Pool(
diff --git a/dev-python/cython/files/cython-0.29.23-tracing-py310.patch b/dev-python/cython/files/cython-0.29.23-tracing-py310.patch
deleted file mode 100644
index ff0e45a646dc..000000000000
--- a/dev-python/cython/files/cython-0.29.23-tracing-py310.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From c9cccfeaf3f0e20c2bb14fc234e86f4fc8e4fe81 Mon Sep 17 00:00:00 2001
-From: Stefan Behnel <stefan_ml@behnel.de>
-Date: Fri, 14 May 2021 19:39:58 +0200
-Subject: [PATCH] Adapt tracing code to Py3.10 beta 1.
-
----
- Cython/Utility/Profile.c | 79 +++++++++++++++++++++++++---------------
- 1 file changed, 49 insertions(+), 30 deletions(-)
-
-diff --git a/Cython/Utility/Profile.c b/Cython/Utility/Profile.c
-index 15ceb41cc2..2cd9af9da7 100644
---- a/Cython/Utility/Profile.c
-+++ b/Cython/Utility/Profile.c
-@@ -47,13 +47,32 @@
- #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
- #endif
-
-- #define __Pyx_TraceDeclarations \
-- static PyCodeObject *$frame_code_cname = NULL; \
-- CYTHON_FRAME_MODIFIER PyFrameObject *$frame_cname = NULL; \
-- int __Pyx_use_tracing = 0;
-+ #define __Pyx_TraceDeclarations \
-+ static PyCodeObject *$frame_code_cname = NULL; \
-+ CYTHON_FRAME_MODIFIER PyFrameObject *$frame_cname = NULL; \
-+ int __Pyx_use_tracing = 0;
-
-- #define __Pyx_TraceFrameInit(codeobj) \
-- if (codeobj) $frame_code_cname = (PyCodeObject*) codeobj;
-+ #define __Pyx_TraceFrameInit(codeobj) \
-+ if (codeobj) $frame_code_cname = (PyCodeObject*) codeobj;
-+
-+#if PY_VERSION_HEX >= 0x030a00b1
-+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \
-+ (unlikely(tstate->cframe->use_tracing) && \
-+ (!(check_tracing) || !tstate->tracing) && \
-+ (!(check_funcs) || tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc)))
-+
-+ #define __Pyx_SetTracing(tstate, enable) \
-+ (tstate)->cframe->use_tracing = (enable)
-+
-+#else
-+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs) \
-+ (unlikely(tstate->use_tracing) && \
-+ (!(check_tracing) || !tstate->tracing) && \
-+ (!(check_funcs) || tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc)))
-+
-+ #define __Pyx_SetTracing(tstate, enable) \
-+ (tstate)->use_tracing = (enable)
-+#endif
-
- #ifdef WITH_THREAD
- #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) \
-@@ -62,8 +81,7 @@
- PyThreadState *tstate; \
- PyGILState_STATE state = PyGILState_Ensure(); \
- tstate = __Pyx_PyThreadState_Current; \
-- if (unlikely(tstate->use_tracing) && !tstate->tracing && \
-- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \
-+ if (__Pyx_IsTracing(tstate, 1, 1)) { \
- __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \
- } \
- PyGILState_Release(state); \
-@@ -71,8 +89,7 @@
- } \
- } else { \
- PyThreadState* tstate = PyThreadState_GET(); \
-- if (unlikely(tstate->use_tracing) && !tstate->tracing && \
-- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \
-+ if (__Pyx_IsTracing(tstate, 1, 1)) { \
- __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \
- if (unlikely(__Pyx_use_tracing < 0)) goto_error; \
- } \
-@@ -80,8 +97,7 @@
- #else
- #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) \
- { PyThreadState* tstate = PyThreadState_GET(); \
-- if (unlikely(tstate->use_tracing) && !tstate->tracing && \
-- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \
-+ if (__Pyx_IsTracing(tstate, 1, 1)) { \
- __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&$frame_code_cname, &$frame_cname, tstate, funcname, srcfile, firstlineno); \
- if (unlikely(__Pyx_use_tracing < 0)) goto_error; \
- } \
-@@ -91,10 +107,9 @@
- #define __Pyx_TraceException() \
- if (likely(!__Pyx_use_tracing)); else { \
- PyThreadState* tstate = __Pyx_PyThreadState_Current; \
-- if (tstate->use_tracing && \
-- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) { \
-+ if (__Pyx_IsTracing(tstate, 0, 1)) { \
- tstate->tracing++; \
-- tstate->use_tracing = 0; \
-+ __Pyx_SetTracing(tstate, 0); \
- PyObject *exc_info = __Pyx_GetExceptionTuple(tstate); \
- if (exc_info) { \
- if (CYTHON_TRACE && tstate->c_tracefunc) \
-@@ -104,7 +119,7 @@
- tstate->c_profileobj, $frame_cname, PyTrace_EXCEPTION, exc_info); \
- Py_DECREF(exc_info); \
- } \
-- tstate->use_tracing = 1; \
-+ __Pyx_SetTracing(tstate, 1); \
- tstate->tracing--; \
- } \
- }
-@@ -113,13 +128,13 @@
- PyObject *type, *value, *traceback;
- __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
- tstate->tracing++;
-- tstate->use_tracing = 0;
-+ __Pyx_SetTracing(tstate, 0);
- if (CYTHON_TRACE && tstate->c_tracefunc)
- tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
- if (tstate->c_profilefunc)
- tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
- CYTHON_FRAME_DEL(frame);
-- tstate->use_tracing = 1;
-+ __Pyx_SetTracing(tstate, 1);
- tstate->tracing--;
- __Pyx_ErrRestoreInState(tstate, type, value, traceback);
- }
-@@ -132,14 +147,14 @@
- PyThreadState *tstate; \
- PyGILState_STATE state = PyGILState_Ensure(); \
- tstate = __Pyx_PyThreadState_Current; \
-- if (tstate->use_tracing) { \
-+ if (__Pyx_IsTracing(tstate, 0, 0)) { \
- __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \
- } \
- PyGILState_Release(state); \
- } \
- } else { \
- PyThreadState* tstate = __Pyx_PyThreadState_Current; \
-- if (tstate->use_tracing) { \
-+ if (__Pyx_IsTracing(tstate, 0, 0)) { \
- __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \
- } \
- } \
-@@ -148,7 +163,7 @@
- #define __Pyx_TraceReturn(result, nogil) \
- if (likely(!__Pyx_use_tracing)); else { \
- PyThreadState* tstate = __Pyx_PyThreadState_Current; \
-- if (tstate->use_tracing) { \
-+ if (__Pyx_IsTracing(tstate, 0, 0)) { \
- __Pyx_call_return_trace_func(tstate, $frame_cname, (PyObject*)result); \
- } \
- }
-@@ -176,9 +191,11 @@
- __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
- __Pyx_PyFrame_SetLineNumber(frame, lineno);
- tstate->tracing++;
-- tstate->use_tracing = 0;
-+ __Pyx_SetTracing(tstate, 0);
-+
- ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
-- tstate->use_tracing = 1;
-+
-+ __Pyx_SetTracing(tstate, 1);
- tstate->tracing--;
- if (likely(!ret)) {
- __Pyx_ErrRestoreInState(tstate, type, value, traceback);
-@@ -199,7 +216,7 @@
- PyThreadState *tstate; \
- PyGILState_STATE state = __Pyx_PyGILState_Ensure(); \
- tstate = __Pyx_PyThreadState_Current; \
-- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && $frame_cname->f_trace)) { \
-+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \
- ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \
- } \
- __Pyx_PyGILState_Release(state); \
-@@ -207,7 +224,7 @@
- } \
- } else { \
- PyThreadState* tstate = __Pyx_PyThreadState_Current; \
-- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && $frame_cname->f_trace)) { \
-+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \
- int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \
- if (unlikely(ret)) goto_error; \
- } \
-@@ -217,7 +234,7 @@
- #define __Pyx_TraceLine(lineno, nogil, goto_error) \
- if (likely(!__Pyx_use_tracing)); else { \
- PyThreadState* tstate = __Pyx_PyThreadState_Current; \
-- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && $frame_cname->f_trace)) { \
-+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && $frame_cname->f_trace) { \
- int ret = __Pyx_call_line_trace_func(tstate, $frame_cname, lineno); \
- if (unlikely(ret)) goto_error; \
- } \
-@@ -263,19 +280,21 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
- (*frame)->f_tstate = tstate;
- #endif
- }
-- __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
-+ __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
-+
- retval = 1;
- tstate->tracing++;
-- tstate->use_tracing = 0;
-+ __Pyx_SetTracing(tstate, 0);
- __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
-+
- #if CYTHON_TRACE
- if (tstate->c_tracefunc)
- retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
- if (retval && tstate->c_profilefunc)
- #endif
- retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
-- tstate->use_tracing = (tstate->c_profilefunc ||
-- (CYTHON_TRACE && tstate->c_tracefunc));
-+
-+ __Pyx_SetTracing(tstate, (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc)));
- tstate->tracing--;
- if (retval) {
- __Pyx_ErrRestoreInState(tstate, type, value, traceback);
diff --git a/dev-python/cython/files/cython-0.29.24-test-failure-warning.patch b/dev-python/cython/files/cython-0.29.24-test-failure-warning.patch
deleted file mode 100644
index 64202a93ecad..000000000000
--- a/dev-python/cython/files/cython-0.29.24-test-failure-warning.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-https://github.com/cython/cython/commit/bf4979e2441ffbc9aaeb88f5c67608578040588f
-https://bugs.gentoo.org/739516
-
-From: Stefan Behnel <stefan_ml@behnel.de>
-Date: Sat, 3 Apr 2021 08:23:44 +0200
-Subject: [PATCH] Make a helper function in a C++ test correctly propagate
- exceptions so that it won't have to spit out compiler warnings.
-
---- a/tests/run/cpp_stl_conversion.pyx
-+++ b/tests/run/cpp_stl_conversion.pyx
-@@ -15,7 +15,7 @@ py_set = set
- py_xrange = xrange
- py_unicode = unicode
-
--cdef string add_strings(string a, string b):
-+cdef string add_strings(string a, string b) except *:
- return a + b
-
- def normalize(bytes b):
-
diff --git a/dev-python/cython/files/cython-0.29.24-unaligned-format.patch b/dev-python/cython/files/cython-0.29.24-unaligned-format.patch
deleted file mode 100644
index 955c32debb49..000000000000
--- a/dev-python/cython/files/cython-0.29.24-unaligned-format.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 2c08fd50d62e4255602ee3c0d41157df7608e773 Mon Sep 17 00:00:00 2001
-From: Stefan Behnel <stefan_ml@behnel.de>
-Date: Wed, 1 Sep 2021 00:09:02 +0200
-Subject: [PATCH] Avoid copying unaligned 16-bit values since some platforms
- require them to be aligned. Use memcpy() instead to let the C compiler decide
- how to do it.
-
-Closes https://github.com/cython/cython/issues/4343
----
- Cython/Utility/TypeConversion.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/Cython/Utility/TypeConversion.c b/Cython/Utility/TypeConversion.c
-index 751d12b62a..3669bc9ec1 100644
---- a/Cython/Utility/TypeConversion.c
-+++ b/Cython/Utility/TypeConversion.c
-@@ -829,14 +829,14 @@ static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value, Py_ssize_t wid
- digit_pos = abs((int)(remaining % (8*8)));
- remaining = ({{TYPE}}) (remaining / (8*8));
- dpos -= 2;
-- *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_8)[digit_pos]; /* copy 2 digits at a time */
-+ memcpy(dpos, DIGIT_PAIRS_8 + digit_pos * 2, 2); /* copy 2 digits at a time, unaligned */
- last_one_off = (digit_pos < 8);
- break;
- case 'd':
- digit_pos = abs((int)(remaining % (10*10)));
- remaining = ({{TYPE}}) (remaining / (10*10));
- dpos -= 2;
-- *(uint16_t*)dpos = ((const uint16_t*)DIGIT_PAIRS_10)[digit_pos]; /* copy 2 digits at a time */
-+ memcpy(dpos, DIGIT_PAIRS_10 + digit_pos * 2, 2); /* copy 2 digits at a time, unaligned */
- last_one_off = (digit_pos < 10);
- break;
- case 'x':
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/, dev-python/cython/files/
@ 2021-10-02 23:20 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2021-10-02 23:20 UTC (permalink / raw
To: gentoo-commits
commit: 35c266ba8249c82cd3a15349e3e8697cf28fb1aa
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 2 23:20:14 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Oct 2 23:20:14 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=35c266ba
dev-python/cython: backport test warning (causing failure) patch
Closes: https://bugs.gentoo.org/739516
Signed-off-by: Sam James <sam <AT> gentoo.org>
dev-python/cython/cython-0.29.24-r1.ebuild | 1 +
.../files/cython-0.29.24-test-failure-warning.patch | 20 ++++++++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/dev-python/cython/cython-0.29.24-r1.ebuild b/dev-python/cython/cython-0.29.24-r1.ebuild
index 648882ae269..35647f5cd19 100644
--- a/dev-python/cython/cython-0.29.24-r1.ebuild
+++ b/dev-python/cython/cython-0.29.24-r1.ebuild
@@ -32,6 +32,7 @@ PATCHES=(
"${FILESDIR}/${PN}-0.29.22-spawn-multiprocessing.patch"
"${FILESDIR}/${PN}-0.29.23-test_exceptions-py310.patch"
"${FILESDIR}/${PN}-0.29.24-unaligned-format.patch"
+ "${FILESDIR}/${PN}-0.29.24-test-failure-warning.patch"
)
SITEFILE=50cython-gentoo.el
diff --git a/dev-python/cython/files/cython-0.29.24-test-failure-warning.patch b/dev-python/cython/files/cython-0.29.24-test-failure-warning.patch
new file mode 100644
index 00000000000..64202a93eca
--- /dev/null
+++ b/dev-python/cython/files/cython-0.29.24-test-failure-warning.patch
@@ -0,0 +1,20 @@
+https://github.com/cython/cython/commit/bf4979e2441ffbc9aaeb88f5c67608578040588f
+https://bugs.gentoo.org/739516
+
+From: Stefan Behnel <stefan_ml@behnel.de>
+Date: Sat, 3 Apr 2021 08:23:44 +0200
+Subject: [PATCH] Make a helper function in a C++ test correctly propagate
+ exceptions so that it won't have to spit out compiler warnings.
+
+--- a/tests/run/cpp_stl_conversion.pyx
++++ b/tests/run/cpp_stl_conversion.pyx
+@@ -15,7 +15,7 @@ py_set = set
+ py_xrange = xrange
+ py_unicode = unicode
+
+-cdef string add_strings(string a, string b):
++cdef string add_strings(string a, string b) except *:
+ return a + b
+
+ def normalize(bytes b):
+
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/, dev-python/cython/files/
@ 2020-06-14 9:31 Michał Górny
0 siblings, 0 replies; 8+ messages in thread
From: Michał Górny @ 2020-06-14 9:31 UTC (permalink / raw
To: gentoo-commits
commit: 14b141814617fb383f7caa03399ffef34dc0945d
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 14 09:17:19 2020 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jun 14 09:31:50 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=14b14181
dev-python/cython: Backport py3.9 classmethod fix
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
...hon-0.29.20.ebuild => cython-0.29.20-r1.ebuild} | 1 +
.../files/cython-0.29.20-py39-classmeth.patch | 59 ++++++++++++++++++++++
2 files changed, 60 insertions(+)
diff --git a/dev-python/cython/cython-0.29.20.ebuild b/dev-python/cython/cython-0.29.20-r1.ebuild
similarity index 98%
rename from dev-python/cython/cython-0.29.20.ebuild
rename to dev-python/cython/cython-0.29.20-r1.ebuild
index 8b4b6e7acc6..c1f45f653d2 100644
--- a/dev-python/cython/cython-0.29.20.ebuild
+++ b/dev-python/cython/cython-0.29.20-r1.ebuild
@@ -31,6 +31,7 @@ BDEPEND="${RDEPEND}
PATCHES=(
"${FILESDIR}/cython-0.29.14-sphinx-update.patch"
+ "${FILESDIR}"/${P}-py39-classmeth.patch
)
SITEFILE=50cython-gentoo.el
diff --git a/dev-python/cython/files/cython-0.29.20-py39-classmeth.patch b/dev-python/cython/files/cython-0.29.20-py39-classmeth.patch
new file mode 100644
index 00000000000..e82982472e8
--- /dev/null
+++ b/dev-python/cython/files/cython-0.29.20-py39-classmeth.patch
@@ -0,0 +1,59 @@
+From 1bb26b964060392ecb08c3b6c8ca4626e5c1eec7 Mon Sep 17 00:00:00 2001
+From: Jeroen Demeyer <jeroen.k.demeyer@gmail.com>
+Date: Wed, 28 Aug 2019 10:56:28 +0200
+Subject: [PATCH] Always bind Cython functions
+
+---
+ Cython/Utility/CythonFunction.c | 15 ---------------
+ tests/run/cyfunction.pyx | 12 ++++++++++++
+ 2 files changed, 12 insertions(+), 15 deletions(-)
+
+diff --git a/Cython/Utility/CythonFunction.c b/Cython/Utility/CythonFunction.c
+index 01ff1e0dd4..0758548cb3 100644
+--- a/Cython/Utility/CythonFunction.c
++++ b/Cython/Utility/CythonFunction.c
+@@ -552,21 +552,6 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit,
+
+ static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
+ {
+- __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+-
+- if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
+- Py_INCREF(func);
+- return func;
+- }
+-
+- if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
+- if (type == NULL)
+- type = (PyObject *)(Py_TYPE(obj));
+- return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
+- }
+-
+- if (obj == Py_None)
+- obj = NULL;
+ return __Pyx_PyMethod_New(func, obj, type);
+ }
+
+diff --git a/tests/run/cyfunction.pyx b/tests/run/cyfunction.pyx
+index cbce48bcfc..bbd2cefb83 100644
+--- a/tests/run/cyfunction.pyx
++++ b/tests/run/cyfunction.pyx
+@@ -376,6 +376,18 @@ class TestUnboundMethod:
+ def meth(self): pass
+
+
++class TestStaticmethod(object):
++ """
++ >>> x = TestStaticmethod()
++ >>> x.staticmeth(42)
++ 42
++ >>> x.staticmeth.__get__(42)()
++ 42
++ """
++ @staticmethod
++ def staticmeth(arg): return arg
++
++
+ cdef class TestOptimisedBuiltinMethod:
+ """
+ >>> obj = TestOptimisedBuiltinMethod()
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/, dev-python/cython/files/
@ 2017-05-12 18:49 Mike Gilbert
0 siblings, 0 replies; 8+ messages in thread
From: Mike Gilbert @ 2017-05-12 18:49 UTC (permalink / raw
To: gentoo-commits
commit: 3c0e9741ce1d2aece78b121af92c6c666095e27c
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri May 12 18:48:44 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri May 12 18:49:09 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3c0e9741
dev-python/cython: fix test failure on ARM
Bug: https://bugs.gentoo.org/618242
Package-Manager: Portage-2.3.5_p32, Repoman-2.3.2_p62
dev-python/cython/cython-0.25.2.ebuild | 4 ++++
.../files/0.25.2-test-cpdef_enums-L-suffix.patch | 19 +++++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/dev-python/cython/cython-0.25.2.ebuild b/dev-python/cython/cython-0.25.2.ebuild
index af740157074..56b6b180aed 100644
--- a/dev-python/cython/cython-0.25.2.ebuild
+++ b/dev-python/cython/cython-0.25.2.ebuild
@@ -34,6 +34,10 @@ DEPEND="${RDEPEND}
SITEFILE=50cython-gentoo.el
S="${WORKDIR}/${MY_PN}-${PV%_*}"
+PATCHES=(
+ "${FILESDIR}"/0.25.2-test-cpdef_enums-L-suffix.patch
+)
+
python_compile() {
if ! python_is_python3; then
local CFLAGS="${CFLAGS}"
diff --git a/dev-python/cython/files/0.25.2-test-cpdef_enums-L-suffix.patch b/dev-python/cython/files/0.25.2-test-cpdef_enums-L-suffix.patch
new file mode 100644
index 00000000000..3a8b9d9d1e7
--- /dev/null
+++ b/dev-python/cython/files/0.25.2-test-cpdef_enums-L-suffix.patch
@@ -0,0 +1,19 @@
+From d92a718a26c9354fbf35f31a17de5c069865a447 Mon Sep 17 00:00:00 2001
+From: Robert Bradshaw <robertwb@gmail.com>
+Date: Tue, 24 Jan 2017 16:57:00 -0800
+Subject: [PATCH] Normalize possible L suffix.
+
+---
+ tests/run/cpdef_enums.pyx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/run/cpdef_enums.pyx b/tests/run/cpdef_enums.pyx
+index 167c762..c264ec5 100644
+--- a/tests/run/cpdef_enums.pyx
++++ b/tests/run/cpdef_enums.pyx
+@@ -93,4 +93,4 @@ def verify_resolution_GH1533():
+ 3
+ """
+ THREE = 100
+- return PyxEnum.THREE
++ return int(PyxEnum.THREE)
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-03-10 17:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-15 0:36 [gentoo-commits] repo/gentoo:master commit in: dev-python/cython/, dev-python/cython/files/ Marek Szuba
-- strict thread matches above, loose matches on Subject: below --
2024-03-10 17:10 Michał Górny
2024-02-27 19:29 Michał Górny
2023-06-04 14:03 Michał Górny
2022-01-08 16:56 Michał Górny
2021-10-02 23:20 Sam James
2020-06-14 9:31 Michał Górny
2017-05-12 18:49 Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox