1{ lib
2, buildPythonPackage
3, fetchPypi
4, ansible-core
5, flaky
6, pytest-mock
7, pytestCheckHook
8, pyyaml
9, setuptools-scm
10, subprocess-tee
11}:
12
13buildPythonPackage rec {
14 pname = "ansible-compat";
15 version = "2.2.5";
16 format = "pyproject";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "sha256-KMfFRf1g75wwWc+y/v0n+S2wkf9rWGj4PxIc614f4bU=";
21 };
22
23 nativeBuildInputs = [
24 setuptools-scm
25 ];
26
27 propagatedBuildInputs = [
28 pyyaml
29 subprocess-tee
30 ];
31
32 preCheck = ''
33 export HOME=$(mktemp -d)
34 export PATH=$PATH:$out/bin
35 '';
36
37 checkInputs = [
38 ansible-core
39 flaky
40 pytest-mock
41 pytestCheckHook
42 ];
43
44 disabledTests = [
45 # require network
46 "test_prepare_environment_with_collections"
47 "test_prerun_reqs_v1"
48 "test_prerun_reqs_v2"
49 "test_require_collection_wrong_version"
50 "test_require_collection"
51 "test_install_collection"
52 "test_install_collection_dest"
53 "test_upgrade_collection"
54 "test_require_collection_no_cache_dir"
55 "test_runtime"
56 ];
57
58 pythonImportsCheck = [ "ansible_compat" ];
59
60 meta = with lib; {
61 description = "A python package containing functions that help interacting with various versions of Ansible";
62 homepage = "https://github.com/ansible/ansible-compat";
63 license = licenses.mit;
64 maintainers = with maintainers; [ ];
65 };
66}