From 64f561b4f5bae9ccc725b839fc4b02215fec6e73 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Mar 2023 20:57:27 +0100 Subject: [PATCH 1/5] py-spy: equalize --- pkgs/development/tools/py-spy/default.nix | 32 ++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) diff --git a/pkgs/development/tools/py-spy/default.nix b/pkgs/development/tools/py-spy/default.nix index 1fb54f8c17ed..c623a2e086fe 100644 --- a/pkgs/development/tools/py-spy/default.nix +++ b/pkgs/development/tools/py-spy/default.nix @@ -1,4 +1,14 @@ -{ lib, stdenv, pkgsBuildBuild, rustPlatform, fetchFromGitHub, pkg-config, libunwind, python3, runCommand, darwin }: +{ lib +, stdenv +, darwin +, fetchFromGitHub +, libunwind +, pkg-config +, pkgsBuildBuild +, python3 +, runCommand +, rustPlatform +}: rustPlatform.buildRustPackage rec { pname = "py-spy"; @@ -7,11 +17,19 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "benfred"; repo = "py-spy"; - rev = "v${version}"; - sha256 = "sha256-NciyzKiDKIMeuHhTjzmHIc3dYW4AniuCNjZugm4hMss="; + rev = "refs/tags/v${version}"; + hash = "sha256-NciyzKiDKIMeuHhTjzmHIc3dYW4AniuCNjZugm4hMss="; }; - nativeBuildInputs = [ rustPlatform.bindgenHook ]; + cargoHash = "sha256-nm+44YWSJOOg9a9d8b3APXW50ThV3iA2C/QsJMttscE="; + + nativeBuildInputs = [ + rustPlatform.bindgenHook + ]; + + nativeCheckInputs = [ + python3 + ]; buildInputs = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [ # Pull a header that contains a definition of proc_pid_rusage(). @@ -27,13 +45,9 @@ rustPlatform.buildRustPackage rec { export RUSTFLAGS="-Clinker=$CC" ''; - nativeCheckInputs = [ python3 ]; - - cargoSha256 = "sha256-nm+44YWSJOOg9a9d8b3APXW50ThV3iA2C/QsJMttscE="; - meta = with lib; { description = "Sampling profiler for Python programs"; license = licenses.mit; - maintainers = [ maintainers.lnl7 ]; + maintainers = with maintainers; [ lnl7 ]; }; } From a320d6a511ca947961b6605c859708e078ad1139 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Mar 2023 21:17:07 +0100 Subject: [PATCH 2/5] py-spy: disable failing test --- pkgs/development/tools/py-spy/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/tools/py-spy/default.nix b/pkgs/development/tools/py-spy/default.nix index c623a2e086fe..f46a0a450739 100644 --- a/pkgs/development/tools/py-spy/default.nix +++ b/pkgs/development/tools/py-spy/default.nix @@ -45,6 +45,11 @@ rustPlatform.buildRustPackage rec { export RUSTFLAGS="-Clinker=$CC" ''; + checkFlags = [ + # thread 'python_data_access::tests::test_copy_string' panicked at 'called `Result::unwrap()` on an `Err` + "--skip=python_data_access::tests::test_copy_string" + ]; + meta = with lib; { description = "Sampling profiler for Python programs"; license = licenses.mit; From 034265f603383a688f07ba0fed3e36de22515c4b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Mar 2023 21:29:57 +0100 Subject: [PATCH 3/5] python310Packages.ray: add changelog to meta --- pkgs/development/python-modules/ray/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/python-modules/ray/default.nix b/pkgs/development/python-modules/ray/default.nix index 99a62a64025d..f296ed56b916 100644 --- a/pkgs/development/python-modules/ray/default.nix +++ b/pkgs/development/python-modules/ray/default.nix @@ -159,6 +159,7 @@ buildPythonPackage rec { meta = with lib; { description = "A unified framework for scaling AI and Python applications"; homepage = "https://github.com/ray-project/ray"; + changelog = "https://github.com/ray-project/ray/releases/tag/ray-${version}"; license = licenses.asl20; maintainers = with maintainers; [ billhuang ]; platforms = [ "x86_64-linux" ]; From c6678ba42d64aa41d7da738b274138b86dd75a9b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Mar 2023 21:38:37 +0100 Subject: [PATCH 4/5] python310Packages.ray: 2.0.0 -> 2.3.0 Changelog: https://github.com/ray-project/ray/releases/tag/ray-2.3.0 --- .../python-modules/ray/binary-hashes.nix | 10 +++++----- pkgs/development/python-modules/ray/default.nix | 15 ++++++++++----- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/ray/binary-hashes.nix b/pkgs/development/python-modules/ray/binary-hashes.nix index 28f9e2103334..33c7c66149d8 100644 --- a/pkgs/development/python-modules/ray/binary-hashes.nix +++ b/pkgs/development/python-modules/ray/binary-hashes.nix @@ -1,11 +1,11 @@ { - cp38 = { - sha256 = "da8adfa33ff54bc61cfe80334a0ee889e0060918db6ff9215aebe32e98b1f939"; - }; cp39 = { - sha256 = "cab13346650f88171b3f348ed352f04695b96d1ab1090ed3b80bdc93e897dbd4"; + sha256 = "596811ae6b41e50f038e0a7cdf0a5320151508d74bac84795bbccad4f6adc6a9"; }; cp310 = { - sha256 = "bcf3bff9517d77ea6c98592fa16e1cfb8bc0cfa345d3be69729bfa9c5bd78a7c"; + sha256 = "b19d381d425259c80b7a9b14aac9d898637ce262d91baeb9569999de3b043967"; + }; + cp311 = { + sha256 = "d86126b6ab5113a3be35281d5699bad731c8f90e02cf6561057017df9312f0a5"; }; } diff --git a/pkgs/development/python-modules/ray/default.nix b/pkgs/development/python-modules/ray/default.nix index f296ed56b916..a8a8750ee3da 100644 --- a/pkgs/development/python-modules/ray/default.nix +++ b/pkgs/development/python-modules/ray/default.nix @@ -57,13 +57,13 @@ let pname = "ray"; - version = "2.0.0"; + version = "2.3.0"; in buildPythonPackage rec { inherit pname version; format = "wheel"; - disabled = pythonOlder "3.8" || pythonAtLeast "3.11"; + disabled = pythonOlder "3.9" || pythonAtLeast "3.12"; src = let @@ -116,7 +116,11 @@ buildPythonPackage rec { pythonRelaxDepsHook ]; - pythonRelaxDeps = [ "grpcio" "click" "protobuf" ]; + pythonRelaxDeps = [ + "click" + "grpcio" + "protobuf" + ]; propagatedBuildInputs = [ attrs @@ -151,10 +155,11 @@ buildPythonPackage rec { postInstall = '' chmod +x $out/${python.sitePackages}/ray/core/src/ray/{gcs/gcs_server,raylet/raylet} - ln -sf ${redis}/bin/redis-server $out/${python.sitePackages}/ray/core/src/ray/thirdparty/redis/src/redis-server ''; - pythonImportsCheck = [ "ray" ]; + pythonImportsCheck = [ + "ray" + ]; meta = with lib; { description = "A unified framework for scaling AI and Python applications"; From 190082d2fd184bc078127135fd358160ab4c4e5d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 13 Mar 2023 21:41:33 +0100 Subject: [PATCH 5/5] py-spy: add homepage and changelog --- pkgs/development/tools/py-spy/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/tools/py-spy/default.nix b/pkgs/development/tools/py-spy/default.nix index f46a0a450739..7f806df22591 100644 --- a/pkgs/development/tools/py-spy/default.nix +++ b/pkgs/development/tools/py-spy/default.nix @@ -52,6 +52,8 @@ rustPlatform.buildRustPackage rec { meta = with lib; { description = "Sampling profiler for Python programs"; + homepage = "https://github.com/benfred/py-spy"; + changelog = "https://github.com/benfred/py-spy/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ lnl7 ]; };