at master 1.5 kB view raw
1{ 2 lib, 3 asttokens, 4 buildPythonPackage, 5 executing, 6 hatchling, 7 fetchFromGitHub, 8 pygments, 9 pytest-mock, 10 pytestCheckHook, 11}: 12 13buildPythonPackage rec { 14 pname = "devtools"; 15 version = "0.12.2"; 16 pyproject = true; 17 18 src = fetchFromGitHub { 19 owner = "samuelcolvin"; 20 repo = "python-${pname}"; 21 tag = "v${version}"; 22 hash = "sha256-1HFbNswdKa/9cQX0Gf6lLW1V5Kt/N4X6/5kQDdzp1Wo="; 23 }; 24 25 patches = [ 26 # https://github.com/samuelcolvin/python-devtools/pull/166 27 ./fix-test-ast-expr.patch 28 ]; 29 30 postPatch = '' 31 substituteInPlace pyproject.toml \ 32 --replace-fail 'asttokens>=2.0.0,<3.0.0' 'asttokens>=2.0.0' \ 33 ''; 34 35 build-system = [ hatchling ]; 36 37 dependencies = [ 38 asttokens 39 executing 40 pygments 41 ]; 42 43 nativeCheckInputs = [ 44 pytestCheckHook 45 pytest-mock 46 ]; 47 48 disabledTests = [ 49 # Test for Windows32 50 "test_print_subprocess" 51 # Sensitive to timing 52 "test_multiple_not_verbose" 53 # Sensitive to interpreter output 54 "test_simple" 55 "test_expr_render" 56 ]; 57 58 disabledTestPaths = [ 59 # pytester_pretty is not available in Nixpkgs 60 "tests/test_insert_assert.py" 61 ]; 62 63 pythonImportsCheck = [ "devtools" ]; 64 65 meta = with lib; { 66 description = "Python's missing debug print command and other development tools"; 67 homepage = "https://python-devtools.helpmanual.io/"; 68 changelog = "https://github.com/samuelcolvin/python-devtools/releases/tag/${src.tag}"; 69 license = licenses.mit; 70 maintainers = with maintainers; [ jdahm ]; 71 }; 72}