1{ lib
2, asttokens
3, buildPythonPackage
4, fetchFromGitHub
5, setuptools-scm
6}:
7
8buildPythonPackage rec {
9 pname = "executing";
10 version = "0.8.2";
11 format = "setuptools";
12
13 src = fetchFromGitHub {
14 owner = "alexmojaki";
15 repo = pname;
16 rev = "v${version}";
17 sha256 = "sha256-CDZQ9DONn7M+2/GtmM2G6nQPpI9dOd0ca+2F1PGRwO4=";
18 };
19
20 nativeBuildInputs = [
21 setuptools-scm
22 ];
23
24 preBuild = ''
25 export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
26 '';
27
28 # Tests appear to run fine (Ran 22 tests in 4.076s) with setuptoolsCheckPhase
29 # but crash with pytestCheckHook
30 checkInputs = [
31 asttokens
32 ];
33
34 pythonImportsCheck = [
35 "executing"
36 ];
37
38 meta = with lib; {
39 description = "Get information about what a frame is currently doing, particularly the AST node being executed";
40 homepage = "https://github.com/alexmojaki/executing";
41 license = licenses.mit;
42 maintainers = with maintainers; [ renatoGarcia ];
43 };
44}