2022-08-12 08:49:51 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, libunwind
|
|
|
|
, lz4
|
|
|
|
, pkg-config
|
|
|
|
, python3
|
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "memray";
|
2023-12-06 22:46:47 +00:00
|
|
|
version = "1.11.0";
|
2022-08-12 08:49:51 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bloomberg";
|
2023-12-06 22:46:47 +00:00
|
|
|
repo = "memray";
|
|
|
|
rev = "refs/tags/v${version}";
|
2023-08-04 16:12:36 +00:00
|
|
|
hash = "sha256-DaJ1Hhg7q4ckA5feUx0twOsmy28v5aBBCTUAkn43xAo=";
|
2022-08-12 08:49:51 +00:00
|
|
|
};
|
|
|
|
|
2022-11-01 07:41:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
2022-09-25 02:49:25 +00:00
|
|
|
|
2022-08-12 08:49:51 +00:00
|
|
|
buildInputs = [
|
|
|
|
libunwind
|
|
|
|
lz4
|
|
|
|
] ++ (with python3.pkgs; [
|
|
|
|
cython
|
|
|
|
]);
|
|
|
|
|
|
|
|
propagatedBuildInputs = with python3.pkgs; [
|
|
|
|
jinja2
|
|
|
|
rich
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = with python3.pkgs; [
|
2022-11-01 07:41:30 +00:00
|
|
|
ipython
|
2022-08-12 08:49:51 +00:00
|
|
|
pytestCheckHook
|
2023-09-15 14:37:16 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.12") [
|
2022-08-19 09:13:29 +00:00
|
|
|
greenlet
|
2022-08-12 08:49:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"memray"
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [
|
|
|
|
"tests"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Import issue
|
|
|
|
"test_header_allocator"
|
2022-11-01 07:41:30 +00:00
|
|
|
"test_hybrid_stack_of_allocations_inside_ceval"
|
2022-08-12 08:49:51 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
|
|
|
# Very time-consuming and some tests fails (performance-related?)
|
|
|
|
"tests/integration/test_main.py"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Memory profiler for Python";
|
|
|
|
homepage = "https://bloomberg.github.io/memray/";
|
2023-12-06 22:46:47 +00:00
|
|
|
changelog = "https://github.com/bloomberg/memray/releases/tag/v${version}";
|
2022-08-12 08:49:51 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|