Loading pkgs/development/python-modules/scalene/default.nix +22 −11 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ psutil, pydantic, pytestCheckHook, pyyaml, rich, setuptools-scm, setuptools, Loading @@ -22,8 +23,8 @@ let owner = "emeryberger"; repo = "heap-layers"; name = "Heap-Layers"; rev = "a2048eae91b531dc5d72be7a194e0b333c06bd4c"; sha256 = "sha256-vl3z30CBX7hav/DM/UE0EQ9lLxZF48tMJrYMXuSulyA="; tag = "v1.0.0"; hash = "sha256-p+8aUC124Digv3c9fZ7lLHg6H8FXoAcAQxlYzf9TYbM="; }; printf-src = fetchFromGitHub { Loading @@ -31,20 +32,20 @@ let repo = "printf"; name = "printf"; tag = "v4.0.0"; sha256 = "sha256-tgLJNJw/dJGQMwCmfkWNBvHB76xZVyyfVVplq7aSJnI="; hash = "sha256-tgLJNJw/dJGQMwCmfkWNBvHB76xZVyyfVVplq7aSJnI="; }; in buildPythonPackage rec { buildPythonPackage (finalAttrs: { pname = "scalene"; version = "1.5.55"; version = "2.1.4"; pyproject = true; src = fetchFromGitHub { owner = "plasma-umass"; repo = "scalene"; tag = "v${version}"; hash = "sha256-aO7l/paYqbneDArAbXxptIlMGfvc1dAaFLucEj/7xbk="; tag = "v${finalAttrs.version}"; hash = "sha256-ISXD7QegTL0OvAGS7KYZAk9MAKTr0hMFe/9ws02Ykgk="; }; patches = [ Loading @@ -52,6 +53,7 @@ buildPythonPackage rec { ]; prePatch = '' mkdir vendor cp -r ${heap-layers-src} vendor/Heap-Layers mkdir vendor/printf cp ${printf-src}/printf.c vendor/printf/printf.cpp Loading @@ -60,18 +62,19 @@ buildPythonPackage rec { sed -i 's/^#define vsnprintf vsnprintf_/\/\/&/' vendor/printf/printf.h ''; nativeBuildInputs = [ build-system = [ cython setuptools setuptools-scm ]; propagatedBuildInputs = [ dependencies = [ cloudpickle jinja2 numpy psutil pydantic pyyaml rich ] ++ lib.optionals stdenv.hostPlatform.isLinux [ nvidia-ml-py ]; Loading @@ -97,6 +100,14 @@ buildPythonPackage rec { "test_nested_package_relative_import" ]; disabledTestPaths = [ # Broken pipe # https://github.com/plasma-umass/scalene/issues/1017 "tests/test_coverup_50.py" "tests/test_multiprocessing_spawn.py::TestReplacementSemLockPickling" "tests/test_multiprocessing_spawn.py::TestSpawnModeIntegration" ]; # remove scalene directory to prevent pytest import confusion preCheck = '' rm -rf scalene Loading @@ -107,7 +118,7 @@ buildPythonPackage rec { meta = { 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}"; changelog = "https://github.com/plasma-umass/scalene/releases/tag/${finalAttrs.src.tag}"; mainProgram = "scalene"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ sarahec ]; Loading @@ -122,4 +133,4 @@ buildPythonPackage rec { "aarch64-darwin" ]; }; } }) Loading
pkgs/development/python-modules/scalene/default.nix +22 −11 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ psutil, pydantic, pytestCheckHook, pyyaml, rich, setuptools-scm, setuptools, Loading @@ -22,8 +23,8 @@ let owner = "emeryberger"; repo = "heap-layers"; name = "Heap-Layers"; rev = "a2048eae91b531dc5d72be7a194e0b333c06bd4c"; sha256 = "sha256-vl3z30CBX7hav/DM/UE0EQ9lLxZF48tMJrYMXuSulyA="; tag = "v1.0.0"; hash = "sha256-p+8aUC124Digv3c9fZ7lLHg6H8FXoAcAQxlYzf9TYbM="; }; printf-src = fetchFromGitHub { Loading @@ -31,20 +32,20 @@ let repo = "printf"; name = "printf"; tag = "v4.0.0"; sha256 = "sha256-tgLJNJw/dJGQMwCmfkWNBvHB76xZVyyfVVplq7aSJnI="; hash = "sha256-tgLJNJw/dJGQMwCmfkWNBvHB76xZVyyfVVplq7aSJnI="; }; in buildPythonPackage rec { buildPythonPackage (finalAttrs: { pname = "scalene"; version = "1.5.55"; version = "2.1.4"; pyproject = true; src = fetchFromGitHub { owner = "plasma-umass"; repo = "scalene"; tag = "v${version}"; hash = "sha256-aO7l/paYqbneDArAbXxptIlMGfvc1dAaFLucEj/7xbk="; tag = "v${finalAttrs.version}"; hash = "sha256-ISXD7QegTL0OvAGS7KYZAk9MAKTr0hMFe/9ws02Ykgk="; }; patches = [ Loading @@ -52,6 +53,7 @@ buildPythonPackage rec { ]; prePatch = '' mkdir vendor cp -r ${heap-layers-src} vendor/Heap-Layers mkdir vendor/printf cp ${printf-src}/printf.c vendor/printf/printf.cpp Loading @@ -60,18 +62,19 @@ buildPythonPackage rec { sed -i 's/^#define vsnprintf vsnprintf_/\/\/&/' vendor/printf/printf.h ''; nativeBuildInputs = [ build-system = [ cython setuptools setuptools-scm ]; propagatedBuildInputs = [ dependencies = [ cloudpickle jinja2 numpy psutil pydantic pyyaml rich ] ++ lib.optionals stdenv.hostPlatform.isLinux [ nvidia-ml-py ]; Loading @@ -97,6 +100,14 @@ buildPythonPackage rec { "test_nested_package_relative_import" ]; disabledTestPaths = [ # Broken pipe # https://github.com/plasma-umass/scalene/issues/1017 "tests/test_coverup_50.py" "tests/test_multiprocessing_spawn.py::TestReplacementSemLockPickling" "tests/test_multiprocessing_spawn.py::TestSpawnModeIntegration" ]; # remove scalene directory to prevent pytest import confusion preCheck = '' rm -rf scalene Loading @@ -107,7 +118,7 @@ buildPythonPackage rec { meta = { 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}"; changelog = "https://github.com/plasma-umass/scalene/releases/tag/${finalAttrs.src.tag}"; mainProgram = "scalene"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ sarahec ]; Loading @@ -122,4 +133,4 @@ buildPythonPackage rec { "aarch64-darwin" ]; }; } })