From 56c76466803f25734a8bff5eac4456e9ffd128b3 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 20 Oct 2024 12:37:15 -0400 Subject: [PATCH 1/5] python312Packages.fabric: add pynacl as dependency --- pkgs/development/python-modules/fabric/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/fabric/default.nix b/pkgs/development/python-modules/fabric/default.nix index 001abb7883a86..5a7530c12c7c1 100644 --- a/pkgs/development/python-modules/fabric/default.nix +++ b/pkgs/development/python-modules/fabric/default.nix @@ -7,6 +7,7 @@ invoke, mock, paramiko, + pynacl, pytestCheckHook, pytest-relaxed, }: @@ -32,6 +33,7 @@ buildPythonPackage rec { paramiko cryptography decorator + pynacl ]; nativeCheckInputs = [ From 9d8c0d2ea44d3346bb87e69312e833151e6f1111 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 20 Oct 2024 12:40:36 -0400 Subject: [PATCH 2/5] python312Packages.fabric: modernize --- .../python-modules/fabric/default.nix | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/fabric/default.nix b/pkgs/development/python-modules/fabric/default.nix index 5a7530c12c7c1..981fa196d0f56 100644 --- a/pkgs/development/python-modules/fabric/default.nix +++ b/pkgs/development/python-modules/fabric/default.nix @@ -8,14 +8,16 @@ mock, paramiko, pynacl, - pytestCheckHook, + pypaInstallHook, pytest-relaxed, + pytestCheckHook, + setuptoolsBuildHook, }: buildPythonPackage rec { pname = "fabric"; version = "3.2.2"; - format = "setuptools"; + pyproject = false; src = fetchPypi { inherit pname version; @@ -28,18 +30,23 @@ buildPythonPackage rec { --replace ', "pathlib2"' ' ' ''; - propagatedBuildInputs = [ - invoke - paramiko + nativeBuildInputs = [ + pypaInstallHook + setuptoolsBuildHook + ]; + + dependencies = [ cryptography decorator + invoke + paramiko pynacl ]; nativeCheckInputs = [ - pytestCheckHook - pytest-relaxed mock + pytest-relaxed + pytestCheckHook ]; # ==================================== ERRORS ==================================== @@ -50,11 +57,12 @@ buildPythonPackage rec { pythonImportsCheck = [ "fabric" ]; - meta = with lib; { + meta = { description = "Pythonic remote execution"; - mainProgram = "fab"; - homepage = "https://www.fabfile.org/"; - license = licenses.bsd2; + homepage = "http://fabfile.org/"; + changelog = "https://www.fabfile.org/changelog.html"; + license = lib.licenses.bsd2; maintainers = [ ]; + mainProgram = "fab"; }; } From 05a1fc032a389bb72fa40d5a8ca7d6e270d6a609 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 20 Oct 2024 12:51:49 -0400 Subject: [PATCH 3/5] python312Packages.fabric: drop support for Python < 3.4 --- pkgs/development/python-modules/fabric/default.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/pkgs/development/python-modules/fabric/default.nix b/pkgs/development/python-modules/fabric/default.nix index 981fa196d0f56..9ecbffaea4578 100644 --- a/pkgs/development/python-modules/fabric/default.nix +++ b/pkgs/development/python-modules/fabric/default.nix @@ -24,12 +24,6 @@ buildPythonPackage rec { hash = "sha256-h4PKQuOwB28IsmkBqsa52bHxnEEAdOesz6uQLBhP9KM="; }; - # only relevant to python < 3.4 - postPatch = '' - substituteInPlace setup.py \ - --replace ', "pathlib2"' ' ' - ''; - nativeBuildInputs = [ pypaInstallHook setuptoolsBuildHook From 5ff9a53b08eb34111315d0c0a3735f0d34d36d18 Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 20 Oct 2024 13:03:39 -0400 Subject: [PATCH 4/5] python312Packages.fabric: update check dependencies Seems we're still not able to use them, though :( --- .../python-modules/fabric/default.nix | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/fabric/default.nix b/pkgs/development/python-modules/fabric/default.nix index 9ecbffaea4578..e066b28f96523 100644 --- a/pkgs/development/python-modules/fabric/default.nix +++ b/pkgs/development/python-modules/fabric/default.nix @@ -2,13 +2,15 @@ lib, buildPythonPackage, fetchPypi, - cryptography, decorator, + deprecated, + icecream, + invocations, invoke, - mock, paramiko, pynacl, pypaInstallHook, + pytest-cov, pytest-relaxed, pytestCheckHook, setuptoolsBuildHook, @@ -30,23 +32,22 @@ buildPythonPackage rec { ]; dependencies = [ - cryptography decorator + deprecated invoke paramiko pynacl ]; nativeCheckInputs = [ - mock + icecream + invocations + pytest-cov pytest-relaxed pytestCheckHook ]; - # ==================================== ERRORS ==================================== - # ________________________ ERROR collecting test session _________________________ - # Direct construction of SpecModule has been deprecated, please use SpecModule.from_parent - # See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent for more details. + # distutils.errors.DistutilsArgError: no commands supplied doCheck = false; pythonImportsCheck = [ "fabric" ]; From 172f2c1245e593140d1dd9ecc44923478cefdced Mon Sep 17 00:00:00 2001 From: seth Date: Sun, 20 Oct 2024 13:05:23 -0400 Subject: [PATCH 5/5] python312Packages.fabric: add getchoo as maintainer --- pkgs/development/python-modules/fabric/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/fabric/default.nix b/pkgs/development/python-modules/fabric/default.nix index e066b28f96523..c3638c2d3b37e 100644 --- a/pkgs/development/python-modules/fabric/default.nix +++ b/pkgs/development/python-modules/fabric/default.nix @@ -57,7 +57,7 @@ buildPythonPackage rec { homepage = "http://fabfile.org/"; changelog = "https://www.fabfile.org/changelog.html"; license = lib.licenses.bsd2; - maintainers = [ ]; + maintainers = with lib.maintainers; [ getchoo ]; mainProgram = "fab"; }; }