summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/backports-asyncio-runner/default.nix
blob: d94a224779325cb6d8b72d67c4f6d33bcc0e214c (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
{
  lib,
  buildPythonPackage,
  pytestCheckHook,
  fetchFromGitHub,
  hatchling,
  hatch-fancy-pypi-readme,
}:

let
  pname = "backports-asyncio-runner";
  version = "1.2.0";
  src = fetchFromGitHub {
    owner = "samypr100";
    repo = "backports.asyncio.runner";
    tag = "v${version}";
    hash = "sha256-F8x7MZgu0VItH7kBke7C7+ZBoM6Iyj8xOeQ2t56ff3k=";
  };
in
buildPythonPackage {
  inherit pname version src;
  pyproject = true;

  build-system = [
    hatch-fancy-pypi-readme
    hatchling
  ];

  pythonImportsCheck = [ "backports.asyncio.runner" ];
  nativeCheckInputs = [ pytestCheckHook ];

  # These tests depend on the test.test_asyncio module in cpython which is
  # removed at build time.
  disabledTestPaths = [
    "tests/test_tasks_py38.py"
    "tests/test_tasks_py39.py"
    "tests/test_tasks_py310.py"
  ];

  meta = {
    changelog = "https://github.com/samypr100/backports.asyncio.runner/releases/tag/${src.tag}";
    description = "Backport of Python 3.11 asyncio.Runner";
    homepage = "https://github.com/samypr100/backports.asyncio.runner";
    license = lib.licenses.psfl;
    maintainers = with lib.maintainers; [ detroyejr ];
  };
}