From 40487cd275cd02782a43d8cf36f6d74ff779fb3d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 28 Mar 2024 21:59:19 +0100 Subject: [PATCH 1/7] python312Packages.elementpath: refactor --- pkgs/development/python-modules/elementpath/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/elementpath/default.nix b/pkgs/development/python-modules/elementpath/default.nix index 79389d56fc70..67254091bc03 100644 --- a/pkgs/development/python-modules/elementpath/default.nix +++ b/pkgs/development/python-modules/elementpath/default.nix @@ -19,7 +19,7 @@ buildPythonPackage rec { hash = "sha256-DE8XAZwYzbYaTJoBNqHR0x4Wigmke+/zgj562X391qM="; }; - nativeBuildInputs = [ + build-system = [ setuptools ]; From 9d4dad105e31b45579b70157404cfc82d40ef2d3 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 28 Mar 2024 21:59:57 +0100 Subject: [PATCH 2/7] python312Packages.elementpath: 4.3.0 -> 4.4.0 Diff: https://github.com/sissaschool/elementpath/compare/refs/tags/v4.3.0...v4.4.0 Changelog: https://github.com/sissaschool/elementpath/blob/v4.4.0/CHANGELOG.rst --- pkgs/development/python-modules/elementpath/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/elementpath/default.nix b/pkgs/development/python-modules/elementpath/default.nix index 67254091bc03..eafe1a8f423e 100644 --- a/pkgs/development/python-modules/elementpath/default.nix +++ b/pkgs/development/python-modules/elementpath/default.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { pname = "elementpath"; - version = "4.3.0"; + version = "4.4.0"; pyproject = true; disabled = pythonOlder "3.7"; @@ -16,7 +16,7 @@ buildPythonPackage rec { owner = "sissaschool"; repo = "elementpath"; rev = "refs/tags/v${version}"; - hash = "sha256-DE8XAZwYzbYaTJoBNqHR0x4Wigmke+/zgj562X391qM="; + hash = "sha256-n1Ps0CybeLeDR5E4UnqmSkbFe0SXyplomEGDchAweSY="; }; build-system = [ From 628816c9f0d4f800ed0a539f075afedf21c3e1a2 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 21:32:40 +0200 Subject: [PATCH 3/7] python312Packages.ansible-pylibssh: refactor --- .../ansible-pylibssh/default.nix | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/ansible-pylibssh/default.nix b/pkgs/development/python-modules/ansible-pylibssh/default.nix index cfe8d7e1e1fa..b5493795c1ad 100644 --- a/pkgs/development/python-modules/ansible-pylibssh/default.nix +++ b/pkgs/development/python-modules/ansible-pylibssh/default.nix @@ -1,20 +1,20 @@ { lib , buildPythonPackage +, cython_3 +, expandvars , fetchPypi -, pythonOlder , libssh -, cython -, wheel +, pythonOlder , setuptools , setuptools-scm , toml -, expandvars +, wheel }: buildPythonPackage rec { pname = "ansible-pylibssh"; version = "1.1.0"; - format = "pyproject"; + pyproject = true; disabled = pythonOlder "3.6"; @@ -23,21 +23,21 @@ buildPythonPackage rec { hash = "sha256-spaGux6dYvtUtpOdU6oN7SEn8IgBof2NpQSPvr+Zplg="; }; - # remove after https://github.com/ansible/pylibssh/pull/502 is merged + # Remove after https://github.com/ansible/pylibssh/pull/502 is merged postPatch = '' sed -i "/setuptools_scm_git_archive/d" pyproject.toml ''; - nativeBuildInputs = [ - cython - wheel + build-system = [ + cython_3 + expandvars setuptools setuptools-scm toml - expandvars + wheel ]; - propagatedBuildInputs = [ + dependencies = [ libssh ]; @@ -48,6 +48,7 @@ buildPythonPackage rec { meta = with lib; { description = "Python bindings to client functionality of libssh specific to Ansible use case"; homepage = "https://github.com/ansible/pylibssh"; + changelog = "https://github.com/ansible/pylibssh/releases/tag/v${version}"; license = licenses.lgpl21Plus; maintainers = with maintainers; [ geluk ]; }; From 2e78aed28d29ad82fe9d04bc2610ab9e3feb1c41 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 21:35:20 +0200 Subject: [PATCH 4/7] python312Packages.ansible-pylibssh: format with nixfmt --- .../ansible-pylibssh/default.nix | 31 +++++++++---------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/pkgs/development/python-modules/ansible-pylibssh/default.nix b/pkgs/development/python-modules/ansible-pylibssh/default.nix index b5493795c1ad..898214c3b508 100644 --- a/pkgs/development/python-modules/ansible-pylibssh/default.nix +++ b/pkgs/development/python-modules/ansible-pylibssh/default.nix @@ -1,14 +1,15 @@ -{ lib -, buildPythonPackage -, cython_3 -, expandvars -, fetchPypi -, libssh -, pythonOlder -, setuptools -, setuptools-scm -, toml -, wheel +{ + lib, + buildPythonPackage, + cython_3, + expandvars, + fetchPypi, + libssh, + pythonOlder, + setuptools, + setuptools-scm, + toml, + wheel, }: buildPythonPackage rec { @@ -37,13 +38,9 @@ buildPythonPackage rec { wheel ]; - dependencies = [ - libssh - ]; + dependencies = [ libssh ]; - pythonImportsCheck = [ - "pylibsshext" - ]; + pythonImportsCheck = [ "pylibsshext" ]; meta = with lib; { description = "Python bindings to client functionality of libssh specific to Ansible use case"; From 95c741d78ab75a55b9d49f307cd2e7151c1f691c Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 21:40:51 +0200 Subject: [PATCH 5/7] python312Packages.pytest-testinfra: format with nixfmt --- .../pytest-testinfra/default.nix | 57 +++++++++---------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/pkgs/development/python-modules/pytest-testinfra/default.nix b/pkgs/development/python-modules/pytest-testinfra/default.nix index 698b61ce058e..537dd1bbdae1 100644 --- a/pkgs/development/python-modules/pytest-testinfra/default.nix +++ b/pkgs/development/python-modules/pytest-testinfra/default.nix @@ -1,14 +1,15 @@ -{ lib -, buildPythonPackage -, fetchPypi -, pythonOlder -, setuptools-scm -, ansible-core -, paramiko -, pytestCheckHook -, pytest-xdist -, pywinrm -, salt +{ + lib, + buildPythonPackage, + fetchPypi, + pythonOlder, + setuptools-scm, + ansible-core, + paramiko, + pytestCheckHook, + pytest-xdist, + pywinrm, + salt, }: buildPythonPackage rec { @@ -21,9 +22,7 @@ buildPythonPackage rec { hash = "sha256-93Qzm5R3Ws3zqMSjeTqOrS6N/HD/NLd4vhWquhQPoZ4="; }; - nativeBuildInputs = [ - setuptools-scm - ]; + nativeBuildInputs = [ setuptools-scm ]; nativeCheckInputs = [ ansible-core @@ -45,22 +44,22 @@ buildPythonPackage rec { ''; # docker is required for all disabled tests - disabledTests = [ - # test/test_backends.py - "test_command" - "test_encoding" - "test_ansible_any_error_fatal" - "test_user_connection" - "test_sudo" - "test_docker_encoding" - ] ++ lib.optionals (pythonOlder "3.11") [ - # broken because salt package only built for python 3.11 - "test_backend_importables" - ]; + disabledTests = + [ + # test/test_backends.py + "test_command" + "test_encoding" + "test_ansible_any_error_fatal" + "test_user_connection" + "test_sudo" + "test_docker_encoding" + ] + ++ lib.optionals (pythonOlder "3.11") [ + # broken because salt package only built for python 3.11 + "test_backend_importables" + ]; - disabledTestPaths = [ - "test/test_modules.py" - ]; + disabledTestPaths = [ "test/test_modules.py" ]; meta = with lib; { description = "Pytest plugin for testing your infrastructure"; From b3b595ae93f2727d9af1dd9a55b0bb529347a6f5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 21:49:39 +0200 Subject: [PATCH 6/7] python312Packages.pytest-testinfra: refactor --- .../pytest-testinfra/default.nix | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/pkgs/development/python-modules/pytest-testinfra/default.nix b/pkgs/development/python-modules/pytest-testinfra/default.nix index 537dd1bbdae1..d9743ad803e6 100644 --- a/pkgs/development/python-modules/pytest-testinfra/default.nix +++ b/pkgs/development/python-modules/pytest-testinfra/default.nix @@ -1,28 +1,30 @@ { lib, + ansible-core, buildPythonPackage, fetchPypi, - pythonOlder, - setuptools-scm, - ansible-core, paramiko, - pytestCheckHook, pytest-xdist, + pytestCheckHook, + pythonOlder, pywinrm, salt, + setuptools-scm, }: buildPythonPackage rec { pname = "pytest-testinfra"; version = "10.1.0"; - format = "setuptools"; + pyproject = true; + + disabled = pythonOlder "3.9"; src = fetchPypi { inherit pname version; hash = "sha256-93Qzm5R3Ws3zqMSjeTqOrS6N/HD/NLd4vhWquhQPoZ4="; }; - nativeBuildInputs = [ setuptools-scm ]; + build-system = [ setuptools-scm ]; nativeCheckInputs = [ ansible-core @@ -33,7 +35,7 @@ buildPythonPackage rec { salt ]; - # markers don't get added when docker is not available (leads to warnings): + # Markers don't get added when docker is not available (leads to warnings): # https://github.com/pytest-dev/pytest-testinfra/blob/9.0.0/test/conftest.py#L223 preCheck = '' export HOME=$(mktemp -d) @@ -43,27 +45,25 @@ buildPythonPackage rec { \tskip_wsl: skip test on WSL, no systemd support' setup.cfg ''; - # docker is required for all disabled tests - disabledTests = - [ - # test/test_backends.py - "test_command" - "test_encoding" - "test_ansible_any_error_fatal" - "test_user_connection" - "test_sudo" - "test_docker_encoding" - ] - ++ lib.optionals (pythonOlder "3.11") [ - # broken because salt package only built for python 3.11 - "test_backend_importables" - ]; + disabledTests = [ + # docker is required for all disabled tests + # test/test_backends.py + "test_command" + "test_encoding" + "test_ansible_any_error_fatal" + "test_user_connection" + "test_sudo" + "test_docker_encoding" + # Broken because salt package only built for Python + "test_backend_importables" + ]; disabledTestPaths = [ "test/test_modules.py" ]; meta = with lib; { description = "Pytest plugin for testing your infrastructure"; homepage = "https://github.com/pytest-dev/pytest-testinfra"; + changelog = "https://github.com/pytest-dev/pytest-testinfra/releases/tag/${version}"; license = licenses.asl20; maintainers = with maintainers; [ hulr ]; }; From 9cba104ad4bba223ee6666faa86797393180f966 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 4 Apr 2024 21:55:48 +0200 Subject: [PATCH 7/7] python312Packages.elementpath: format with nixfmt --- .../python-modules/elementpath/default.nix | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/elementpath/default.nix b/pkgs/development/python-modules/elementpath/default.nix index eafe1a8f423e..e9144961c6d7 100644 --- a/pkgs/development/python-modules/elementpath/default.nix +++ b/pkgs/development/python-modules/elementpath/default.nix @@ -1,8 +1,9 @@ -{ lib -, buildPythonPackage -, fetchFromGitHub -, pythonOlder -, setuptools +{ + lib, + buildPythonPackage, + fetchFromGitHub, + pythonOlder, + setuptools, }: buildPythonPackage rec { @@ -19,16 +20,12 @@ buildPythonPackage rec { hash = "sha256-n1Ps0CybeLeDR5E4UnqmSkbFe0SXyplomEGDchAweSY="; }; - build-system = [ - setuptools - ]; + build-system = [ setuptools ]; # avoid circular dependency with xmlschema which directly depends on this doCheck = false; - pythonImportsCheck = [ - "elementpath" - ]; + pythonImportsCheck = [ "elementpath" ]; meta = with lib; { description = "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml";