Skip to content

Commit c313162

Browse files
authored
python313Packages.pyfma: add patch for numpy > 2 (NixOS#373054)
2 parents b240909 + 51335e4 commit c313162

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

pkgs/development/python-modules/pyfma/default.nix

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
lib,
33
buildPythonPackage,
44
fetchFromGitHub,
5+
fetchpatch,
56
importlib-metadata,
67
numpy,
78
pybind11,
@@ -13,21 +14,30 @@
1314
buildPythonPackage rec {
1415
pname = "pyfma";
1516
version = "0.1.6";
16-
format = "pyproject";
17+
pyproject = true;
18+
1719
disabled = pythonOlder "3.7";
1820

1921
src = fetchFromGitHub {
2022
owner = "nschloe";
21-
repo = pname;
23+
repo = "pyfma";
2224
rev = version;
23-
sha256 = "12i68jj9n1qj9phjnj6f0kmfhlsd3fqjlk9p6d4gs008azw5m8yn";
25+
hash = "sha256-1qNa+FcIAP1IMzdNKrEbTVPo6gTOSCvhTRIHm6REJoo=";
2426
};
2527

26-
nativeBuildInputs = [ setuptools ];
28+
patches = [
29+
# Replace deprecated np.find_common_type calls with np.promote_types, https://github.com/nschloe/pyfma/pull/17
30+
(fetchpatch {
31+
url = "https://github.com/nschloe/pyfma/commit/e12d69d97a97657ab4fec3e8f2b2859f4360bc03.patch";
32+
hash = "sha256-BsQe4hpo+Cripa0FRGFnRBs1oQ1GZA1+ZYzycy5M4Ek=";
33+
})
34+
];
35+
36+
build-system = [ setuptools ];
2737

2838
buildInputs = [ pybind11 ];
2939

30-
propagatedBuildInputs = [ numpy ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
40+
dependencies = [ numpy ] ++ lib.optionals (pythonOlder "3.8") [ importlib-metadata ];
3141

3242
nativeCheckInputs = [ pytestCheckHook ];
3343

@@ -36,6 +46,7 @@ buildPythonPackage rec {
3646
meta = with lib; {
3747
description = "Fused multiply-add for Python";
3848
homepage = "https://github.com/nschloe/pyfma";
49+
changelog = "https://github.com/nschloe/pyfma/releases/tag/${version}";
3950
license = licenses.mit;
4051
maintainers = [ ];
4152
};

0 commit comments

Comments
 (0)