summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/Cython
diff options
context:
space:
mode:
authorSimon Kohlmeyer <simon.kohlmeyer@gmail.com>2022-10-28 17:42:13 +0200
committerSimon Kohlmeyer <simon.kohlmeyer@gmail.com>2022-10-28 21:00:22 +0200
commitef5beda91c592e14bee1f2aee6bf333d3df1a2de (patch)
tree7a9dbd8ad4a92ad5c0298672315f6b574dd1c7e4 /pkgs/development/python-modules/Cython
parent38164d1660dcc24b41a5a22f1e9ef075a8e26714 (diff)
python311Packages.cython: add patch for python3.11 compatibility
Diffstat (limited to 'pkgs/development/python-modules/Cython')
-rw-r--r--pkgs/development/python-modules/Cython/default.nix16
1 files changed, 14 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/Cython/default.nix b/pkgs/development/python-modules/Cython/default.nix
index 4a6c14b5709b..3065e822f6be 100644
--- a/pkgs/development/python-modules/Cython/default.nix
+++ b/pkgs/development/python-modules/Cython/default.nix
@@ -48,8 +48,20 @@ in buildPythonPackage rec {
# trashcan support is needed to avoid stack overflows during object deallocation in sage (https://trac.sagemath.org/ticket/27267)
(fetchpatch {
name = "trashcan.patch";
- url = "https://git.sagemath.org/sage.git/plain/build/pkgs/cython/patches/trashcan.patch?id=4569a839f070a1a38d5dbce2a4d19233d25aeed2";
- sha256 = "sha256-+pOF1XNTEtNseLpqPzrc1Jfwt5hGx7doUoccIhNneYY=";
+ url = "https://github.com/cython/cython/commit/f781880b6780117660b2026caadf4a6d7905722f.patch";
+ sha256 = "sha256-SnjaJdBZxm3O5gJ5Dxut6+eeVtZv+ygUUNwAwgoiFxg=";
+ })
+ # The above commit introduces custom trashcan macros, as well as
+ # compiler changes to use them in Cython-emitted code. The latter
+ # change is still useful, but the former has been upstreamed as of
+ # Python 3.8, and the patch below makes Cython use the upstream
+ # trashcan macros whenever available. This is needed for Python
+ # 3.11 support, because the API used in Cython's implementation
+ # changed: https://github.com/cython/cython/pull/4475
+ (fetchpatch {
+ name = "disable-trashcan.patch";
+ url = "https://github.com/cython/cython/commit/e337825cdcf5e94d38ba06a0cb0188e99ce0cc92.patch";
+ sha256 = "sha256-q0f63eetKrDpmP5Z4v8EuGxg26heSyp/62OYqhRoSso=";
})
];