mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
root5: fix building with python 3.13 (#414801)
This commit is contained in:
parent
aeb2a13428
commit
e59a2e909e
2 changed files with 18 additions and 0 deletions
|
@ -85,6 +85,10 @@ stdenv.mkDerivation rec {
|
|||
# Backport Python 3.11 fix to v5 from v6.26
|
||||
# https://github.com/root-project/root/commit/484deb056dacf768aba4954073b41105c431bffc
|
||||
./root5-python311-fix.patch
|
||||
|
||||
# Backport Python 3.13 fix to v5 from v6.25
|
||||
# https://github.com/root-project/root/commit/9aa67a863482eef8cf50850b9ac3724e35f58781
|
||||
./python313-PyCFunction_Call.patch
|
||||
];
|
||||
|
||||
# https://github.com/root-project/root/issues/13216
|
||||
|
|
14
pkgs/by-name/ro/root5/python313-PyCFunction_Call.patch
Normal file
14
pkgs/by-name/ro/root5/python313-PyCFunction_Call.patch
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- a/bindings/pyroot/src/TCustomPyTypes.cxx
|
||||
+++ b/bindings/pyroot/src/TCustomPyTypes.cxx
|
||||
@@ -240,7 +240,11 @@
|
||||
// the function is globally shared, so set and reset its "self" (ok, b/c of GIL)
|
||||
Py_INCREF( self );
|
||||
func->m_self = self;
|
||||
+#if PY_VERSION_HEX >= 0x03090000
|
||||
+ PyObject* result = PyObject_Call( (PyObject*)func, args, kw );
|
||||
+#else
|
||||
PyObject* result = PyCFunction_Call( (PyObject*)func, args, kw );
|
||||
+#endif
|
||||
func->m_self = 0;
|
||||
Py_DECREF( self );
|
||||
Py_DECREF( args );
|
Loading…
Add table
Add a link
Reference in a new issue