summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/asks/default.nix
blob: ad1ffce9d0eb8114daf32c4aa55984b8887c039b (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
{
  lib,
  buildPythonPackage,
  pythonAtLeast,
  fetchFromGitHub,
  anyio,
  async-generator,
  h11,
  curio,
  overly,
  pytestCheckHook,
  trio,
}:

buildPythonPackage rec {
  pname = "asks";
  version = "3.0.0";

  format = "setuptools";

  src = fetchFromGitHub {
    owner = "theelous3";
    repo = "asks";
    rev = "v${version}";
    hash = "sha256-ipQ5n2386DqR3kNpmTVhNPG+LC7gfCbvrlZ97+UP55g=";
  };

  propagatedBuildInputs = [
    anyio
    async-generator
    h11
  ];

  nativeCheckInputs = [
    curio
    overly
    pytestCheckHook
    trio
  ];

  disabledTests = lib.optionals (pythonAtLeast "3.12") [
    # stuck in threading waiter.acquire()
    "test_https_get"
    "test_https_get_checks_cert"
  ];

  pythonImportsCheck = [ "asks" ];

  meta = {
    description = "Async requests-like HTTP library for Python";
    homepage = "https://github.com/theelous3/asks";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ dotlambda ];
  };
}