From 553ea1aaedae325b4b33899a6f45901148012405 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 3 Apr 2024 11:31:07 +0200 Subject: [PATCH 1/5] python312Packages.types-requests: 2.31.0.20240311 -> 2.31.0.20240403 --- pkgs/development/python-modules/types-requests/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/types-requests/default.nix b/pkgs/development/python-modules/types-requests/default.nix index ef7b45698158..52b17296e7ff 100644 --- a/pkgs/development/python-modules/types-requests/default.nix +++ b/pkgs/development/python-modules/types-requests/default.nix @@ -8,12 +8,12 @@ buildPythonPackage rec { pname = "types-requests"; - version = "2.31.0.20240311"; + version = "2.31.0.20240403"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-scG2ar+3+nmq4JCXqBHEqpcTDriDHGDkeu5Mo0RzHKU="; + hash = "sha256-4eDNC2VTNPOdn4craKExDw40Nkdoi/LO6TLsTCsE3lk="; }; nativeBuildInputs = [ From b245e3efce3546364803585689858c8346f7c9f0 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 3 Apr 2024 11:33:25 +0200 Subject: [PATCH 2/5] python312Packages.types-requests: refactor --- .../development/python-modules/types-requests/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/types-requests/default.nix b/pkgs/development/python-modules/types-requests/default.nix index 52b17296e7ff..f92ffa763964 100644 --- a/pkgs/development/python-modules/types-requests/default.nix +++ b/pkgs/development/python-modules/types-requests/default.nix @@ -2,8 +2,8 @@ , buildPythonPackage , fetchPypi , setuptools -, urllib3 , types-urllib3 +, urllib3 }: buildPythonPackage rec { @@ -16,13 +16,13 @@ buildPythonPackage rec { hash = "sha256-4eDNC2VTNPOdn4craKExDw40Nkdoi/LO6TLsTCsE3lk="; }; - nativeBuildInputs = [ + build-system = [ setuptools - urllib3 ]; - propagatedBuildInputs = [ + dependencies = [ types-urllib3 + urllib3 ]; # Module doesn't have tests From 01cf5df08191d13ac08567d3b0468179e0fafff6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 3 Apr 2024 11:34:31 +0200 Subject: [PATCH 3/5] python312Packages.types-requests:: use nixfmt --- .../python-modules/types-requests/default.nix | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/types-requests/default.nix b/pkgs/development/python-modules/types-requests/default.nix index f92ffa763964..1933aed78853 100644 --- a/pkgs/development/python-modules/types-requests/default.nix +++ b/pkgs/development/python-modules/types-requests/default.nix @@ -1,9 +1,10 @@ -{ lib -, buildPythonPackage -, fetchPypi -, setuptools -, types-urllib3 -, urllib3 +{ + lib, + buildPythonPackage, + fetchPypi, + setuptools, + types-urllib3, + urllib3, }: buildPythonPackage rec { @@ -16,9 +17,7 @@ buildPythonPackage rec { hash = "sha256-4eDNC2VTNPOdn4craKExDw40Nkdoi/LO6TLsTCsE3lk="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; dependencies = [ types-urllib3 @@ -28,9 +27,7 @@ buildPythonPackage rec { # Module doesn't have tests doCheck = false; - pythonImportsCheck = [ - "requests-stubs" - ]; + pythonImportsCheck = [ "requests-stubs" ]; meta = with lib; { description = "Typing stubs for requests"; From e774c5f8b84bc3adb2aea239ca1a370b9bd534bb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 3 Apr 2024 11:48:20 +0200 Subject: [PATCH 4/5] python312Packages.tabcmd: refactor - add missing input - add pythonImportsCheck - report argparse issue upstream --- .../python-modules/tabcmd/default.nix | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/tabcmd/default.nix b/pkgs/development/python-modules/tabcmd/default.nix index 2f7574a32f95..f6d1fe75bf0f 100644 --- a/pkgs/development/python-modules/tabcmd/default.nix +++ b/pkgs/development/python-modules/tabcmd/default.nix @@ -7,11 +7,12 @@ , ftfy , mock , pyinstaller-versionfile +, pytest-order , pytestCheckHook , python3 , pythonOlder -, requests , pythonRelaxDepsHook +, requests , setuptools , setuptools-scm , tableauserverclient @@ -34,6 +35,12 @@ buildPythonPackage rec { hash = "sha256-f9zoYeb4RzcCtgcCYYvvuCuFrjqpP3Fhv38bUWH24+g="; }; + prePatch = '' + # Remove an unneeded dependency that can't be resolved + # https://github.com/tableau/tabcmd/pull/282 + sed -i "/'argparse',/d" pyproject.toml + ''; + pythonRelaxDeps = [ "tableauserverclient" "urllib3" @@ -41,10 +48,13 @@ buildPythonPackage rec { nativeBuildInputs = [ pythonRelaxDepsHook + ]; + + build-system = [ setuptools ]; - propagatedBuildInputs = [ + dependencies = [ appdirs argparse doit @@ -62,14 +72,10 @@ buildPythonPackage rec { nativeCheckInputs = [ mock + pytest-order pytestCheckHook ]; - # Remove an unneeded dependency that can't be resolved - prePatch = '' - sed -i "/'argparse',/d" pyproject.toml - ''; - # Create a "tabcmd" executable postInstall = '' # Create a directory for our wrapped binary. @@ -87,13 +93,16 @@ buildPythonPackage rec { chmod +x $out/bin/tabcmd ''; + pythonImportsCheck = [ + "tabcmd" + ]; meta = with lib; { - description = "A command line client for working with Tableau Server."; - mainProgram = "tabcmd"; + description = "A command line client for working with Tableau Server"; homepage = "https://github.com/tableau/tabcmd"; changelog = "https://github.com/tableau/tabcmd/releases/tag/v${version}"; license = licenses.mit; maintainers = with maintainers; [ ]; + mainProgram = "tabcmd"; }; } From 3d286c09f074c8d25955d2f4b48619152c5bd93c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 3 Apr 2024 11:49:26 +0200 Subject: [PATCH 5/5] python312Packages.tabcmd: use nixfmt --- .../python-modules/tabcmd/default.nix | 59 +++++++++---------- 1 file changed, 27 insertions(+), 32 deletions(-) diff --git a/pkgs/development/python-modules/tabcmd/default.nix b/pkgs/development/python-modules/tabcmd/default.nix index f6d1fe75bf0f..956e71bff605 100644 --- a/pkgs/development/python-modules/tabcmd/default.nix +++ b/pkgs/development/python-modules/tabcmd/default.nix @@ -1,26 +1,27 @@ -{ lib -, appdirs -, argparse -, buildPythonPackage -, doit -, fetchPypi -, ftfy -, mock -, pyinstaller-versionfile -, pytest-order -, pytestCheckHook -, python3 -, pythonOlder -, pythonRelaxDepsHook -, requests -, setuptools -, setuptools-scm -, tableauserverclient -, types-appdirs -, types-mock -, types-requests -, types-setuptools -, urllib3 +{ + lib, + appdirs, + argparse, + buildPythonPackage, + doit, + fetchPypi, + ftfy, + mock, + pyinstaller-versionfile, + pytest-order, + pytestCheckHook, + python3, + pythonOlder, + pythonRelaxDepsHook, + requests, + setuptools, + setuptools-scm, + tableauserverclient, + types-appdirs, + types-mock, + types-requests, + types-setuptools, + urllib3, }: buildPythonPackage rec { @@ -46,13 +47,9 @@ buildPythonPackage rec { "urllib3" ]; - nativeBuildInputs = [ - pythonRelaxDepsHook - ]; + nativeBuildInputs = [ pythonRelaxDepsHook ]; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; dependencies = [ appdirs @@ -93,9 +90,7 @@ buildPythonPackage rec { chmod +x $out/bin/tabcmd ''; - pythonImportsCheck = [ - "tabcmd" - ]; + pythonImportsCheck = [ "tabcmd" ]; meta = with lib; { description = "A command line client for working with Tableau Server";