summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/lox/default.nix
blob: f127251e8ac1a8a8a8375d1ec2542f64f1c0dc86 (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
{
  buildPythonPackage,
  fetchFromGitHub,
  lib,

  pathos,
  pytestCheckHook,
  pytest-mock,
  setuptools,
  tqdm,
}:

buildPythonPackage rec {
  pname = "lox";
  version = "0.13.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "BrianPugh";
    repo = "lox";
    tag = "v${version}";
    hash = "sha256-I/+/wl+H3OLAN26qJVqyqgW72GoTddm59j2Y6fsz8AM=";
  };

  build-system = [ setuptools ];

  dependencies = [ pathos ];

  # setup.py requires pytest-runner for setuptools, which is wrong
  postPatch = ''
    substituteInPlace setup.py --replace-fail '"pytest-runner",' ""
  '';

  pythonImportsCheck = [ "lox" ];

  disabledTests = [
    # Benchmark, performance testing
    "test_perf_lock"
    "test_perf_qlock"

    # time sensitive testing
    "test_bathroom_example"
    "test_RWLock_r"
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-mock
    tqdm
  ];

  meta = {
    description = "Threading and Multiprocessing made easy";
    changelog = "https://github.com/BrianPugh/lox/releases/tag/${src.tag}";
    homepage = "https://github.com/BrianPugh/lox";
    license = lib.licenses.asl20;
    maintainers = [ lib.maintainers.greg ];
  };
}