nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

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; ··· 20 19 hash = "sha256-c28kt2ADw4wHNLN0CBPcJU/kqm6g679QRaICk4WwaBc="; 21 20 }; 22 21 22 + # error: implicit declaration of function ‘_PyLong_AsInt’; did you mean ‘PyLong_AsInt’? [-Wimplicit-function-declaration] 23 + # https://github.com/python/cpython/issues/108444 24 + postPatch = lib.optionalString (pythonAtLeast "3.13") '' 25 + substituteInPlace src/generic/py_capi_utils.{c,h} \ 26 + --replace-fail "_PyLong_AsInt" "PyLong_AsInt" 27 + ''; 28 + 23 29 build-system = [ 24 30 setuptools 25 31 ]; 26 32 27 33 pythonImportsCheck = [ "mathutils" ]; 28 34 29 - meta = with lib; { 30 - description = "A general math utilities library providing Matrix, Vector, Quaternion, Euler and Color classes, written in C for speed"; 35 + meta = { 36 + description = "General math utilities library providing Matrix, Vector, Quaternion, Euler and Color classes, written in C for speed"; 31 37 homepage = "https://gitlab.com/ideasman42/blender-mathutils"; 32 - license = licenses.gpl2Plus; 33 - maintainers = with maintainers; [ autra ]; 38 + license = lib.licenses.gpl2Plus; 39 + maintainers = with lib.maintainers; [ autra ]; 34 40 }; 35 41 }