From 21afaadf5ca73ef4b72d23350f868831c2fb843c Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 7 Feb 2025 15:12:52 +0100 Subject: [PATCH 1/2] python312Packages.sparse: add GaetanLepage as maintainer --- pkgs/development/python-modules/sparse/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/sparse/default.nix b/pkgs/development/python-modules/sparse/default.nix index c09040d2beaa..215b826b477d 100644 --- a/pkgs/development/python-modules/sparse/default.nix +++ b/pkgs/development/python-modules/sparse/default.nix @@ -59,5 +59,6 @@ buildPythonPackage rec { downloadPage = "https://github.com/pydata/sparse/releases/tag/${version}"; license = licenses.bsd3; maintainers = [ ]; + maintainers = with maintainers; [ GaetanLepage ]; }; } From e6bbb5d92a27068d6b8c92ea054349a0bb13422d Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 7 Feb 2025 15:13:02 +0100 Subject: [PATCH 2/2] python312Packages.sparse: cleanup & mark as broken on aarch64-linux --- .../python-modules/sparse/default.nix | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/pkgs/development/python-modules/sparse/default.nix b/pkgs/development/python-modules/sparse/default.nix index 215b826b477d..81e567f46ec4 100644 --- a/pkgs/development/python-modules/sparse/default.nix +++ b/pkgs/development/python-modules/sparse/default.nix @@ -1,15 +1,21 @@ { lib, buildPythonPackage, - dask, - fetchPypi, - numba, - numpy, - pytest7CheckHook, - pythonOlder, + fetchFromGitHub, + + # build-system setuptools, setuptools-scm, + + # dependencies + numba, + numpy, scipy, + + # tests + dask, + pytest-cov-stub, + pytestCheckHook, }: buildPythonPackage rec { @@ -17,18 +23,13 @@ buildPythonPackage rec { version = "0.15.5"; pyproject = true; - disabled = pythonOlder "3.8"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-THbODJb1zVwxt+eeZQ8AIkJMKxbwXxAEnpxjge5L4mY="; + src = fetchFromGitHub { + owner = "pydata"; + repo = "sparse"; + tag = version; + hash = "sha256-W4rcq7G/bQsT9oTLieOzWNst5LnIAelRMbm+uUPeQgs="; }; - postPatch = '' - substituteInPlace pytest.ini \ - --replace-fail "--cov-report term-missing --cov-report html --cov-report=xml --cov-report=term --cov sparse --cov-config .coveragerc --junitxml=junit/test-results.xml" "" - ''; - build-system = [ setuptools setuptools-scm @@ -42,23 +43,23 @@ buildPythonPackage rec { nativeCheckInputs = [ dask - pytest7CheckHook + pytest-cov-stub + pytestCheckHook ]; pythonImportsCheck = [ "sparse" ]; - pytestFlagsArray = [ - "-W" - "ignore::pytest.PytestRemovedIn8Warning" - ]; - - meta = with lib; { + meta = { description = "Sparse n-dimensional arrays computations"; homepage = "https://sparse.pydata.org/"; changelog = "https://sparse.pydata.org/en/stable/changelog.html"; downloadPage = "https://github.com/pydata/sparse/releases/tag/${version}"; - license = licenses.bsd3; - maintainers = [ ]; - maintainers = with maintainers; [ GaetanLepage ]; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ GaetanLepage ]; + badPlatforms = [ + # Most tests fail with: Fatal Python error: Segmentation fault + # numba/typed/typedlist.py", line 344 in append + "aarch64-linux" + ]; }; }