From 4cb18b646a48cef8df60bd16fd1c5478d1c16886 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 31 Dec 2024 14:02:36 +0100 Subject: [PATCH] python312Packages.ansible-compat: 24.9.1 -> 24.10.0 Changelog: https://github.com/ansible/ansible-compat/releases/tag/v24.10.0 --- .../python-modules/ansible-compat/default.nix | 55 ++++++++++--------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/pkgs/development/python-modules/ansible-compat/default.nix b/pkgs/development/python-modules/ansible-compat/default.nix index 68eb5fb6a75e..b31b55082467 100644 --- a/pkgs/development/python-modules/ansible-compat/default.nix +++ b/pkgs/development/python-modules/ansible-compat/default.nix @@ -1,33 +1,38 @@ { lib, buildPythonPackage, - fetchPypi, - ansible-core, - coreutils, - flaky, - pytest-mock, - pytestCheckHook, - pyyaml, + fetchFromGitHub, + + # build-system setuptools, setuptools-scm, + + # dependencies + pyyaml, subprocess-tee, - pythonOlder, + + # tests + coreutils, + ansible-core, + flaky, + git, + pytest-mock, + pytestCheckHook, }: buildPythonPackage rec { pname = "ansible-compat"; - version = "24.9.1"; + version = "24.10.0"; pyproject = true; - disabled = pythonOlder "3.10"; - - src = fetchPypi { - pname = "ansible_compat"; - inherit version; - hash = "sha256-n/ICReG9nemyOjZ5AlJKsOEfvPt0GDGZbaXaW2Crld8="; + src = fetchFromGitHub { + owner = "ansible"; + repo = "ansible-compat"; + tag = "v${version}"; + hash = "sha256-cc97ENpoRoaYaGbnGeHU5z+ijCS8PLWtgXpQ0F3b5rk="; }; - nativeBuildInputs = [ + build-system = [ setuptools setuptools-scm ]; @@ -40,26 +45,26 @@ buildPythonPackage rec { preCheck = '' export HOME=$(mktemp -d) substituteInPlace test/test_runtime.py \ - --replace-fail "printenv" "${coreutils}/bin/printenv" + --replace-fail "printenv" "${lib.getExe' coreutils "printenv"}" ''; nativeCheckInputs = [ ansible-core flaky + git pytest-mock pytestCheckHook ]; disabledTests = [ # require network + "test_install_collection_from_disk" + "test_install_collection_git" + "test_load_plugins" "test_prepare_environment_with_collections" "test_prerun_reqs_v1" "test_prerun_reqs_v2" - "test_require_collection_wrong_version" - "test_require_collection" - "test_install_collection" - "test_install_collection_dest" - "test_upgrade_collection" + "test_require_collection_install" "test_require_collection_no_cache_dir" "test_runtime_has_playbook" "test_runtime_plugins" @@ -68,11 +73,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "ansible_compat" ]; - meta = with lib; { + meta = { description = "Function collection that help interacting with various versions of Ansible"; homepage = "https://github.com/ansible/ansible-compat"; changelog = "https://github.com/ansible/ansible-compat/releases/tag/v${version}"; - license = licenses.mit; - maintainers = with maintainers; [ dawidd6 ]; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ dawidd6 ]; }; }