From 43e81c18d390afaa6d399d9160efc759185827af Mon Sep 17 00:00:00 2001 From: Pyrox Date: Fri, 26 Jul 2024 15:10:25 -0400 Subject: [PATCH 1/3] python312Packages.chart-studio: Remove nose dependency --- .../python-modules/chart-studio/default.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/chart-studio/default.nix b/pkgs/development/python-modules/chart-studio/default.nix index 69c7cd19cc2a..da3f85f58ddc 100644 --- a/pkgs/development/python-modules/chart-studio/default.nix +++ b/pkgs/development/python-modules/chart-studio/default.nix @@ -3,13 +3,13 @@ buildPythonPackage, fetchFromGitHub, mock, - nose, plotly, pytest, requests, retrying, setuptools, six, + pytestCheckHook, }: buildPythonPackage rec { @@ -38,14 +38,19 @@ buildPythonPackage rec { nativeCheckInputs = [ mock - nose + pytestCheckHook pytest ]; - # most tests talk to a service - checkPhase = '' - HOME=$TMPDIR pytest chart_studio/tests/test_core chart_studio/tests/test_plot_ly/test_api + preCheck = '' + export HOME=$(mktemp -d) ''; + # most tests talk to a network service, so only run ones that don't + pytestFlagsArray = [ + "chart_studio/tests/test_core" + "chart_studio/tests/test_plot_ly/test_api" + ]; + meta = with lib; { description = "Utilities for interfacing with Plotly's Chart Studio service"; homepage = "https://github.com/plotly/plotly.py/tree/master/packages/python/chart-studio"; From 47ad667debf16904322f4a35e93ed506ed4866ed Mon Sep 17 00:00:00 2001 From: Pyrox Date: Fri, 26 Jul 2024 15:11:15 -0400 Subject: [PATCH 2/3] python312Packages.chart-studio: Modernize --- pkgs/development/python-modules/chart-studio/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/chart-studio/default.nix b/pkgs/development/python-modules/chart-studio/default.nix index da3f85f58ddc..e3affbee36d3 100644 --- a/pkgs/development/python-modules/chart-studio/default.nix +++ b/pkgs/development/python-modules/chart-studio/default.nix @@ -27,9 +27,9 @@ buildPythonPackage rec { sourceRoot = "${src.name}/packages/python/chart-studio"; - nativeBuildInputs = [ setuptools ]; + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ plotly requests retrying @@ -51,10 +51,10 @@ buildPythonPackage rec { "chart_studio/tests/test_plot_ly/test_api" ]; - meta = with lib; { + meta = { description = "Utilities for interfacing with Plotly's Chart Studio service"; homepage = "https://github.com/plotly/plotly.py/tree/master/packages/python/chart-studio"; - license = with licenses; [ mit ]; + license = with lib.licenses; [ mit ]; maintainers = [ ]; }; } From 55e56b8e841a6451c4a560aa7560c468e87d76be Mon Sep 17 00:00:00 2001 From: Pyrox Date: Fri, 26 Jul 2024 18:13:17 -0400 Subject: [PATCH 3/3] python312Packages.chart-studio: 5.23.0 -> 1.1.0-unstable-2024-07-23 --- .../python-modules/chart-studio/default.nix | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/chart-studio/default.nix b/pkgs/development/python-modules/chart-studio/default.nix index e3affbee36d3..b850ed89301e 100644 --- a/pkgs/development/python-modules/chart-studio/default.nix +++ b/pkgs/development/python-modules/chart-studio/default.nix @@ -4,24 +4,23 @@ fetchFromGitHub, mock, plotly, - pytest, requests, retrying, setuptools, - six, pytestCheckHook, }: buildPythonPackage rec { pname = "chart-studio"; - version = "5.23.0"; + version = "1.1.0-unstable-2024-07-23"; pyproject = true; # chart-studio was split from plotly src = fetchFromGitHub { owner = "plotly"; repo = "plotly.py"; - rev = "refs/tags/v${version}"; + # We use plotly's upstream version as it's the same repo, but chart studio has its own version number. + rev = "v5.23.0"; hash = "sha256-K1hEs00AGBCe2fgytyPNWqE5M0jU5ESTzynP55kc05Y="; }; @@ -33,19 +32,18 @@ buildPythonPackage rec { plotly requests retrying - six ]; nativeCheckInputs = [ mock pytestCheckHook - pytest ]; + preCheck = '' export HOME=$(mktemp -d) ''; - # most tests talk to a network service, so only run ones that don't + # most tests talk to a network service, so only run ones that don't do that. pytestFlagsArray = [ "chart_studio/tests/test_core" "chart_studio/tests/test_plot_ly/test_api"