summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/nest-asyncio/default.nix
blob: 652c276534b76ce57158cbbb77f6cc182a2b992f (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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  pytestCheckHook,
  pythonAtLeast,
  setuptools,
  setuptools-scm,
}:

buildPythonPackage rec {
  pname = "nest-asyncio";
  version = "1.6.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "erdewit";
    repo = "nest_asyncio";
    tag = "v${version}";
    hash = "sha256-5I5WItOl1QpyI4OXZgZf8GiQ7Jlo+SJbDicIbernaU4=";
  };

  build-system = [
    setuptools
    setuptools-scm
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  disabledTestPaths = lib.optionals (pythonAtLeast "3.14") [
    "tests/nest_test.py::NestTest::test_timeout"
  ];

  pythonImportsCheck = [ "nest_asyncio" ];

  meta = {
    description = "Patch asyncio to allow nested event loops";
    homepage = "https://github.com/erdewit/nest_asyncio";
    changelog = "https://github.com/erdewit/nest_asyncio/releases/tag/v${version}";
    license = lib.licenses.bsdOriginal;
    maintainers = [ ];
  };
}