about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/asyncclick/default.nix
blob: 48ba646b7412768ef2b48f5018fb94a3453f2a7a (plain) (blame)
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
{ lib
, anyio
, buildPythonPackage
, fetchFromGitHub
, setuptools-scm
, pytestCheckHook
, pythonOlder
, trio
}:

buildPythonPackage rec {
  pname = "asyncclick";
  version = "8.1.3.2";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "python-trio";
    repo = pname;
    rev = version;
    hash = "sha256-by1clF+WAfN/gjOg/F60O1tCZ3qAhWqiiJJY04iMzQ8=";
  };

  SETUPTOOLS_SCM_PRETEND_VERSION = version;

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    anyio
  ];

  nativeCheckInputs = [
    pytestCheckHook
    trio
  ];

  pytestFlagsArray = [
    "-W" "ignore::trio.TrioDeprecationWarning"
  ];

  disabledTests = [
    # RuntimeWarning: coroutine 'Context.invoke' was never awaited
    "test_context_invoke_type"
  ];

  pythonImportsCheck = [ "asyncclick" ];

  meta = with lib; {
    description = "Python composable command line utility";
    homepage = "https://github.com/python-trio/asyncclick";
    license = with licenses; [ bsd3 ];
    maintainers = with maintainers; [ fab ];
  };
}