From f571160ef6720bb8058c9ffe48a1c2ec4be93849 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 May 2024 12:00:07 +0200 Subject: [PATCH 1/3] python312Packages.amcrest: format with nixfmt --- .../python-modules/amcrest/default.nix | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/amcrest/default.nix b/pkgs/development/python-modules/amcrest/default.nix index 1de7da6f829f..77e7a2e0f032 100644 --- a/pkgs/development/python-modules/amcrest/default.nix +++ b/pkgs/development/python-modules/amcrest/default.nix @@ -1,15 +1,16 @@ -{ lib -, argcomplete -, buildPythonPackage -, fetchFromGitHub -, mock -, httpx -, pytestCheckHook -, pythonOlder -, requests -, responses -, urllib3 -, typing-extensions +{ + lib, + argcomplete, + buildPythonPackage, + fetchFromGitHub, + mock, + httpx, + pytestCheckHook, + pythonOlder, + requests, + responses, + urllib3, + typing-extensions, }: buildPythonPackage rec { @@ -40,9 +41,7 @@ buildPythonPackage rec { responses ]; - pythonImportsCheck = [ - "amcrest" - ]; + pythonImportsCheck = [ "amcrest" ]; meta = with lib; { description = "Python module for Amcrest and Dahua Cameras"; From 85b2d39cfebaeefbe67968e42999379a61b17fc2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 May 2024 12:02:13 +0200 Subject: [PATCH 2/3] python311Packages.amcrest: refactor --- .../python-modules/amcrest/default.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/amcrest/default.nix b/pkgs/development/python-modules/amcrest/default.nix index 77e7a2e0f032..4b48b513d639 100644 --- a/pkgs/development/python-modules/amcrest/default.nix +++ b/pkgs/development/python-modules/amcrest/default.nix @@ -3,20 +3,21 @@ argcomplete, buildPythonPackage, fetchFromGitHub, - mock, httpx, + mock, pytestCheckHook, pythonOlder, requests, responses, - urllib3, + setuptools, typing-extensions, + urllib3, }: buildPythonPackage rec { pname = "amcrest"; version = "1.9.8"; - format = "setuptools"; + pyproject = true; disabled = pythonOlder "3.7"; @@ -27,7 +28,11 @@ buildPythonPackage rec { hash = "sha256-v0jWEZo06vltEq//suGrvJ/AeeDxUG5CCFhbf03q34w="; }; - propagatedBuildInputs = [ + build-system = [ + setuptools + ]; + + dependencies = [ argcomplete httpx requests @@ -41,13 +46,15 @@ buildPythonPackage rec { responses ]; - pythonImportsCheck = [ "amcrest" ]; + pythonImportsCheck = [ + "amcrest" + ]; meta = with lib; { description = "Python module for Amcrest and Dahua Cameras"; homepage = "https://github.com/tchellomello/python-amcrest"; changelog = "https://github.com/tchellomello/python-amcrest/releases/tag/${version}"; - license = with licenses; [ gpl2Only ]; + license = licenses.gpl2Only; maintainers = with maintainers; [ fab ]; }; } From fb10919e25eb287bf0ecdce973c8aa330e1d0933 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 22 May 2024 12:03:45 +0200 Subject: [PATCH 3/3] python312Packages.amcrest: disable on Python 3.12 Still uses distutils, https://github.com/tchellomello/python-amcrest/issues/234 --- pkgs/development/python-modules/amcrest/default.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/amcrest/default.nix b/pkgs/development/python-modules/amcrest/default.nix index 4b48b513d639..de008a1d2f1b 100644 --- a/pkgs/development/python-modules/amcrest/default.nix +++ b/pkgs/development/python-modules/amcrest/default.nix @@ -6,6 +6,7 @@ httpx, mock, pytestCheckHook, + pythonAtLeast, pythonOlder, requests, responses, @@ -19,7 +20,8 @@ buildPythonPackage rec { version = "1.9.8"; pyproject = true; - disabled = pythonOlder "3.7"; + # Still uses distutils, https://github.com/tchellomello/python-amcrest/issues/234 + disabled = pythonOlder "3.7" || pythonAtLeast "3.12"; src = fetchFromGitHub { owner = "tchellomello";