From da9a6959c9a7a58b1ccdc9260654394418f692b1 Mon Sep 17 00:00:00 2001 From: Ben Darwin Date: Thu, 5 Jan 2023 16:04:51 -0500 Subject: [PATCH] python310Packages.pymedio: init at 0.2.13 --- .../python-modules/pymedio/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/pymedio/default.nix diff --git a/pkgs/development/python-modules/pymedio/default.nix b/pkgs/development/python-modules/pymedio/default.nix new file mode 100644 index 000000000000..d7f90f9f8453 --- /dev/null +++ b/pkgs/development/python-modules/pymedio/default.nix @@ -0,0 +1,40 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, numpy +}: + +buildPythonPackage rec { + pname = "pymedio"; + version = "0.2.13"; + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "jcreinhold"; + repo = "pymedio"; + rev = "refs/tags/v${version}"; + hash = "sha256-iHbClOrtYkHT1Nar+5j/ig4Krya8LdQdFB4Mmm5B9bg="; + }; + + # relax Python dep to work with 3.10.x + postPatch = '' + substituteInPlace setup.cfg --replace "!=3.10.*," "" + ''; + + propagatedBuildInputs = [ numpy ]; + + doCheck = false; # requires SimpleITK python package (not in Nixpkgs) + + pythonImportsCheck = [ + "pymedio" + ]; + + meta = with lib; { + description = "Read medical image files into Numpy arrays"; + homepage = "https://github.com/jcreinhold/pymedio"; + license = licenses.mit; + maintainers = with maintainers; [ bcdarwin ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8ce5080662a8..92a3ace96349 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8304,6 +8304,8 @@ self: super: with self; { pymediaroom = callPackage ../development/python-modules/pymediaroom { }; + pymedio = callPackage ../development/python-modules/pymedio { }; + pymeeus = callPackage ../development/python-modules/pymeeus { }; pymelcloud = callPackage ../development/python-modules/pymelcloud { };