depot/third_party/nixpkgs/pkgs/development/python-modules/ansible-compat/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

78 lines
1.6 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
ansible-core,
coreutils,
flaky,
pytest-mock,
pytestCheckHook,
pyyaml,
setuptools,
setuptools-scm,
subprocess-tee,
pythonOlder,
}:
buildPythonPackage rec {
pname = "ansible-compat";
version = "24.7.0";
pyproject = true;
disabled = pythonOlder "3.10";
src = fetchPypi {
pname = "ansible_compat";
inherit version;
hash = "sha256-e8egwgpQWh62/5h3Bx/iAzATBCkIfaKY4lCZoU9w0C8=";
};
nativeBuildInputs = [
setuptools
setuptools-scm
];
dependencies = [
pyyaml
subprocess-tee
];
preCheck = ''
export HOME=$(mktemp -d)
substituteInPlace test/test_runtime.py \
--replace-fail "printenv" "${coreutils}/bin/printenv"
'';
nativeCheckInputs = [
ansible-core
flaky
pytest-mock
pytestCheckHook
];
disabledTests = [
# require network
"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_no_cache_dir"
"test_runtime_has_playbook"
"test_runtime_plugins"
"test_scan_sys_path"
];
pythonImportsCheck = [ "ansible_compat" ];
meta = with lib; {
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 ];
};
}