Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
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 # Asserts against time passed using time.time() to estimate 49 # if the test runs fast enough. That makes the test flaky when 50 # running on slow systems or cross- / emulated building 51 "test_many_source_for_filename_calls" 52 ]; 53 54 pythonImportsCheck = [ "executing" ]; 55 56 meta = with lib; { 57 description = "Get information about what a frame is currently doing, particularly the AST node being executed"; 58 homepage = "https://github.com/alexmojaki/executing"; 59 license = licenses.mit; 60 maintainers = with maintainers; [ renatoGarcia ]; 61 }; 62}