summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/invocations/default.nix
blob: 7927a501aeb0728e9738db64b5b65fb473cdb6ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
  lib,
  buildPythonPackage,
  blessed,
  fetchFromGitHub,
  invoke,
  releases,
  semantic-version,
  tabulate,
  tqdm,
  twine,
  pytestCheckHook,
  pytest-relaxed,
  pytest-mock,
  icecream,
  pip,
}:

buildPythonPackage rec {
  pname = "invocations";
  version = "3.3.0";
  format = "setuptools";

  src = fetchFromGitHub {
    owner = "pyinvoke";
    repo = "invocations";
    tag = version;
    hash = "sha256-JnhdcxhBNsYgDMcljtGKjOT1agujlao/66QifGuh6I0=";
  };

  patches = [ ./replace-blessings-with-blessed.patch ];

  postPatch = ''
    substituteInPlace setup.py \
      --replace "semantic_version>=2.4,<2.7" "semantic_version"
  '';

  propagatedBuildInputs = [
    blessed
    invoke
    releases
    semantic-version
    tabulate
    tqdm
    twine
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-relaxed
    pytest-mock
    icecream
    pip
  ];

  pythonImportsCheck = [ "invocations" ];

  disabledTests = [
    # invoke.exceptions.UnexpectedExit
    "autodoc_"

    # ValueError: Call either Version('1.2.3') or Version(major=1, ...)
    "component_state_enums_contain_human_readable_values"
    "load_version_"
    "prepare_"
    "status_"
  ];

  meta = {
    description = "Common/best-practice Invoke tasks and collections";
    homepage = "https://invocations.readthedocs.io/";
    changelog = "https://github.com/pyinvoke/invocations/blob/${version}/docs/changelog.rst";
    license = lib.licenses.bsd2;
    maintainers = with lib.maintainers; [ samuela ];
  };
}