fa5436e0a7
GitOrigin-RevId: e8057b67ebf307f01bdcc8fba94d94f75039d1f6
68 lines
1.3 KiB
Nix
68 lines
1.3 KiB
Nix
{
|
|
lib,
|
|
buildPythonPackage,
|
|
hypothesis,
|
|
fetchPypi,
|
|
setuptools,
|
|
setuptools-scm,
|
|
cloudpickle,
|
|
cython,
|
|
jinja2,
|
|
numpy,
|
|
psutil,
|
|
pynvml,
|
|
pytestCheckHook,
|
|
pythonOlder,
|
|
rich,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "scalene";
|
|
version = "1.5.41";
|
|
pyproject = true;
|
|
disabled = pythonOlder "3.9";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-akjxv9Qot2lGntZxkxfFqz65VboL1qduykfjyEg1Ivg=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
cython
|
|
setuptools
|
|
setuptools-scm
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
cloudpickle
|
|
jinja2
|
|
psutil
|
|
pynvml
|
|
rich
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
checkInputs = [
|
|
hypothesis
|
|
numpy
|
|
];
|
|
|
|
# remove scalene directory to prevent pytest import confusion
|
|
preCheck = ''
|
|
rm -rf scalene
|
|
'';
|
|
|
|
pythonImportsCheck = [ "scalene" ];
|
|
|
|
meta = with lib; {
|
|
description = "High-resolution, low-overhead CPU, GPU, and memory profiler for Python with AI-powered optimization suggestions";
|
|
homepage = "https://github.com/plasma-umass/scalene";
|
|
changelog = "https://github.com/plasma-umass/scalene/releases/tag/v${version}";
|
|
mainProgram = "scalene";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ sarahec ];
|
|
};
|
|
}
|