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