1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 pythonAtLeast, 6 pythonOlder, 7 8 # build-system 9 setuptools, 10 setuptools-scm, 11 12 # tests 13 asttokens, 14 littleutils, 15 rich, 16 pytestCheckHook, 17}: 18 19buildPythonPackage rec { 20 pname = "executing"; 21 version = "2.0.1"; 22 format = "pyproject"; 23 24 disabled = pythonOlder "3.7"; 25 26 src = fetchFromGitHub { 27 owner = "alexmojaki"; 28 repo = pname; 29 rev = "v${version}"; 30 hash = "sha256-PBvfkv9GQ5Vj5I5SygtmHXtqqHMJ4XgNV1/I+lSU0/U="; 31 }; 32 33 nativeBuildInputs = [ 34 setuptools 35 setuptools-scm 36 ]; 37 38 nativeCheckInputs = [ 39 asttokens 40 littleutils 41 pytestCheckHook 42 ] ++ lib.optionals (pythonAtLeast "3.11") [ rich ]; 43 44 disabledTests = [ 45 # requires ipython, which causes a circular dependency 46 "test_two_statement_lookups" 47 ]; 48 49 pythonImportsCheck = [ "executing" ]; 50 51 meta = with lib; { 52 description = "Get information about what a frame is currently doing, particularly the AST node being executed"; 53 homepage = "https://github.com/alexmojaki/executing"; 54 license = licenses.mit; 55 maintainers = with maintainers; [ renatoGarcia ]; 56 }; 57}