1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5
6 pathos,
7 pytestCheckHook,
8 pytest-mock,
9 setuptools,
10 tqdm,
11}:
12
13buildPythonPackage rec {
14 pname = "lox";
15 version = "0.13.0";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "BrianPugh";
20 repo = "lox";
21 tag = "v${version}";
22 hash = "sha256-I/+/wl+H3OLAN26qJVqyqgW72GoTddm59j2Y6fsz8AM=";
23 };
24
25 build-system = [ setuptools ];
26
27 dependencies = [ pathos ];
28
29 # setup.py requires pytest-runner for setuptools, which is wrong
30 postPatch = ''
31 substituteInPlace setup.py --replace-fail '"pytest-runner",' ""
32 '';
33
34 pythonImportsCheck = [ "lox" ];
35
36 disabledTests = [
37 # Benchmark, performance testing
38 "test_perf_lock"
39 "test_perf_qlock"
40
41 # time sensitive testing
42 "test_bathroom_example"
43 "test_RWLock_r"
44 ];
45
46 nativeCheckInputs = [
47 pytestCheckHook
48 pytest-mock
49 tqdm
50 ];
51
52 meta = {
53 description = "Threading and Multiprocessing made easy";
54 changelog = "https://github.com/BrianPugh/lox/releases/tag/${src.tag}";
55 homepage = "https://github.com/BrianPugh/lox";
56 license = lib.licenses.asl20;
57 maintainers = [ lib.maintainers.greg ];
58 };
59}