2021-03-20 04:20:00 +00:00
|
|
|
{ lib
|
2021-12-06 16:07:01 +00:00
|
|
|
, asttokens
|
2021-03-20 04:20:00 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-09-18 10:52:07 +00:00
|
|
|
, setuptools-scm
|
2022-12-17 10:02:37 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, littleutils
|
|
|
|
, pythonAtLeast
|
|
|
|
, rich
|
2021-03-20 04:20:00 +00:00
|
|
|
}:
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "executing";
|
2022-12-17 10:02:37 +00:00
|
|
|
version = "1.2.0";
|
|
|
|
format = "pyproject";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alexmojaki";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-12-17 10:02:37 +00:00
|
|
|
sha256 = "sha256-3M3uSJ5xQ5Ciy8Lz21u9zjju/7SBSFHobCqSiJ6AP8M=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
preBuild = ''
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION="${version}"
|
|
|
|
'';
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
checkInputs = [
|
2022-12-17 10:02:37 +00:00
|
|
|
pytestCheckHook
|
2021-12-06 16:07:01 +00:00
|
|
|
asttokens
|
2022-12-17 10:02:37 +00:00
|
|
|
littleutils
|
|
|
|
] ++ lib.optionals (pythonAtLeast "3.11") [
|
|
|
|
rich
|
2021-12-06 16:07:01 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"executing"
|
|
|
|
];
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Get information about what a frame is currently doing, particularly the AST node being executed";
|
|
|
|
homepage = "https://github.com/alexmojaki/executing";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ renatoGarcia ];
|
|
|
|
};
|
|
|
|
}
|