blob: fd49d7e4cb10eca4055bde59e990e1b845078863 (
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
60
61
62
63
64
65
66
67
68
69
70
71
72
|
{
lib,
asttokens,
buildPythonPackage,
executing,
hatchling,
fetchFromGitHub,
pygments,
pytest-mock,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "devtools";
version = "0.12.2";
pyproject = true;
src = fetchFromGitHub {
owner = "samuelcolvin";
repo = "python-${pname}";
tag = "v${version}";
hash = "sha256-1HFbNswdKa/9cQX0Gf6lLW1V5Kt/N4X6/5kQDdzp1Wo=";
};
patches = [
# https://github.com/samuelcolvin/python-devtools/pull/166
./fix-test-ast-expr.patch
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail 'asttokens>=2.0.0,<3.0.0' 'asttokens>=2.0.0' \
'';
build-system = [ hatchling ];
dependencies = [
asttokens
executing
pygments
];
nativeCheckInputs = [
pytestCheckHook
pytest-mock
];
disabledTests = [
# Test for Windows32
"test_print_subprocess"
# Sensitive to timing
"test_multiple_not_verbose"
# Sensitive to interpreter output
"test_simple"
"test_expr_render"
];
disabledTestPaths = [
# pytester_pretty is not available in Nixpkgs
"tests/test_insert_assert.py"
];
pythonImportsCheck = [ "devtools" ];
meta = {
description = "Python's missing debug print command and other development tools";
homepage = "https://python-devtools.helpmanual.io/";
changelog = "https://github.com/samuelcolvin/python-devtools/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ jdahm ];
};
}
|