2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pillow,
|
|
|
|
scipy,
|
|
|
|
numpy,
|
|
|
|
pytestCheckHook,
|
|
|
|
imread,
|
|
|
|
lib,
|
|
|
|
stdenv,
|
2021-12-19 01:06:50 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "mahotas";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "1.4.14";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "luispedro";
|
|
|
|
repo = "mahotas";
|
2024-05-15 15:35:15 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-9tjk3rhcfAYROZKwmwHzHAN7Ui0EgmxPErQyF//K0r8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
imread
|
|
|
|
numpy
|
|
|
|
pillow
|
|
|
|
scipy
|
2021-12-19 01:06:50 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# mahotas/_morph.cpp:864:10: error: no member named 'random_shuffle' in namespace 'std'
|
2024-06-05 15:53:02 +00:00
|
|
|
env = lib.optionalAttrs stdenv.cc.isClang { NIX_CFLAGS_COMPILE = "-std=c++14"; };
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# tests must be run in the build directory
|
|
|
|
preCheck = ''
|
|
|
|
cd build/lib*
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
# re-enable as soon as https://github.com/luispedro/mahotas/issues/97 is fixed
|
|
|
|
disabledTests = [
|
|
|
|
"test_colors"
|
|
|
|
"test_ellipse_axes"
|
|
|
|
"test_normalize"
|
|
|
|
"test_haralick3d"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "mahotas" ];
|
2021-12-19 01:06:50 +00:00
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
disabled = stdenv.hostPlatform.isi686; # Failing tests
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-09-26 11:04:55 +00:00
|
|
|
broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Computer vision package based on numpy";
|
|
|
|
homepage = "https://mahotas.readthedocs.io/";
|
|
|
|
maintainers = with maintainers; [ luispedro ];
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|