From 06c9cf23aa84608bab0acf7146072d2f65e7656b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Jan 2025 13:31:59 +0100 Subject: [PATCH 1/2] python312Packages.fast-histogram: refactor --- .../python-modules/fast-histogram/default.nix | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/fast-histogram/default.nix b/pkgs/development/python-modules/fast-histogram/default.nix index 790100108da9a..09b5eeac92e33 100644 --- a/pkgs/development/python-modules/fast-histogram/default.nix +++ b/pkgs/development/python-modules/fast-histogram/default.nix @@ -1,44 +1,42 @@ { lib, buildPythonPackage, - pytestCheckHook, fetchFromGitHub, + hypothesis, + numpy, + pytest-cov-stub, + pytestCheckHook, python, pythonOlder, - setuptools, setuptools-scm, - numpy, - wheel, - hypothesis, - pytest-cov-stub, + setuptools, }: buildPythonPackage rec { pname = "fast-histogram"; version = "0.14"; - format = "setuptools"; + pyproject = true; - disabled = pythonOlder "3.6"; + disabled = pythonOlder "3.9"; src = fetchFromGitHub { owner = "astrofrog"; - repo = pname; + repo = "fast-histogram"; tag = "v${version}"; - sha256 = "sha256-vIzDDzz6e7PXArHdZdSSgShuTjy3niVdGtXqgmyJl1w="; + hash = "sha256-vIzDDzz6e7PXArHdZdSSgShuTjy3niVdGtXqgmyJl1w="; }; - nativeBuildInputs = [ + build-system = [ setuptools setuptools-scm - wheel ]; - propagatedBuildInputs = [ numpy ]; + dependencies = [ numpy ]; nativeCheckInputs = [ - pytestCheckHook hypothesis pytest-cov-stub + pytestCheckHook ]; pytestFlagsArray = [ "${builtins.placeholder "out"}/${python.sitePackages}" ]; @@ -46,8 +44,9 @@ buildPythonPackage rec { pythonImportsCheck = [ "fast_histogram" ]; meta = with lib; { - homepage = "https://github.com/astrofrog/fast-histogram"; description = "Fast 1D and 2D histogram functions in Python"; + homepage = "https://github.com/astrofrog/fast-histogram"; + changelog = "https://github.com/astrofrog/fast-histogram/blob/v${version}/CHANGES.md"; license = licenses.bsd2; maintainers = with maintainers; [ ifurther ]; }; From 914742a2e21c544e221c152abd33e7a27804aedd Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Jan 2025 13:33:02 +0100 Subject: [PATCH 2/2] python313Packages.fast-histogram: disable failing test --- pkgs/development/python-modules/fast-histogram/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/fast-histogram/default.nix b/pkgs/development/python-modules/fast-histogram/default.nix index 09b5eeac92e33..e35246f15b13d 100644 --- a/pkgs/development/python-modules/fast-histogram/default.nix +++ b/pkgs/development/python-modules/fast-histogram/default.nix @@ -43,6 +43,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "fast_histogram" ]; + disabledTests = [ + # ValueError + "test_1d_compare_with_numpy" + ]; + meta = with lib; { description = "Fast 1D and 2D histogram functions in Python"; homepage = "https://github.com/astrofrog/fast-histogram";