lol

python313Packages.mathutils: fix on python 3.13

+13 -5
+13 -5
pkgs/development/python-modules/mathutils/default.nix
··· 2 2 lib, 3 3 buildPythonPackage, 4 4 fetchFromGitLab, 5 + pythonAtLeast, 5 6 6 7 # build-system 7 8 setuptools, 8 9 }: 9 10 10 - buildPythonPackage rec { 11 + buildPythonPackage { 11 12 pname = "mathutils"; 12 13 version = "3.3.0"; 13 14 pyproject = true; ··· 19 20 hash = "sha256-c28kt2ADw4wHNLN0CBPcJU/kqm6g679QRaICk4WwaBc="; 20 21 }; 21 22 23 + # error: implicit declaration of function ‘_PyLong_AsInt’; did you mean ‘PyLong_AsInt’? [-Wimplicit-function-declaration] 24 + # https://github.com/python/cpython/issues/108444 25 + postPatch = lib.optionalString (pythonAtLeast "3.13") '' 26 + substituteInPlace src/generic/py_capi_utils.{c,h} \ 27 + --replace-fail "_PyLong_AsInt" "PyLong_AsInt" 28 + ''; 29 + 22 30 build-system = [ 23 31 setuptools 24 32 ]; 25 33 26 34 pythonImportsCheck = [ "mathutils" ]; 27 35 28 - meta = with lib; { 29 - description = "A general math utilities library providing Matrix, Vector, Quaternion, Euler and Color classes, written in C for speed"; 36 + meta = { 37 + description = "General math utilities library providing Matrix, Vector, Quaternion, Euler and Color classes, written in C for speed"; 30 38 homepage = "https://gitlab.com/ideasman42/blender-mathutils"; 31 - license = licenses.gpl2Plus; 32 - maintainers = with maintainers; [ autra ]; 39 + license = lib.licenses.gpl2Plus; 40 + maintainers = with lib.maintainers; [ autra ]; 33 41 }; 34 42 }