python313Packages.mathutils: fix on python 3.13

This commit is contained in:
Gaetan Lepage
2025-02-21 11:41:52 +01:00
parent d12aeacded
commit 09db5cce97
@@ -2,12 +2,13 @@
lib,
buildPythonPackage,
fetchFromGitLab,
pythonAtLeast,
# build-system
setuptools,
}:
buildPythonPackage rec {
buildPythonPackage {
pname = "mathutils";
version = "3.3.0";
pyproject = true;
@@ -19,16 +20,23 @@ buildPythonPackage rec {
hash = "sha256-c28kt2ADw4wHNLN0CBPcJU/kqm6g679QRaICk4WwaBc=";
};
# error: implicit declaration of function _PyLong_AsInt; did you mean PyLong_AsInt? [-Wimplicit-function-declaration]
# https://github.com/python/cpython/issues/108444
postPatch = lib.optionalString (pythonAtLeast "3.13") ''
substituteInPlace src/generic/py_capi_utils.{c,h} \
--replace-fail "_PyLong_AsInt" "PyLong_AsInt"
'';
build-system = [
setuptools
];
pythonImportsCheck = [ "mathutils" ];
meta = with lib; {
description = "A general math utilities library providing Matrix, Vector, Quaternion, Euler and Color classes, written in C for speed";
meta = {
description = "General math utilities library providing Matrix, Vector, Quaternion, Euler and Color classes, written in C for speed";
homepage = "https://gitlab.com/ideasman42/blender-mathutils";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ autra ];
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ autra ];
};
}