2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
|
|
|
|
# build-system
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
|
|
|
|
# tests
|
|
|
|
asttokens,
|
|
|
|
littleutils,
|
|
|
|
rich,
|
|
|
|
pytestCheckHook,
|
2021-03-20 04:20:00 +00:00
|
|
|
}:
|
2020-07-18 16:06:22 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "executing";
|
2024-01-13 08:15:51 +00:00
|
|
|
version = "2.0.1";
|
2022-12-17 10:02:37 +00:00
|
|
|
format = "pyproject";
|
2020-07-18 16:06:22 +00:00
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-03-20 04:20:00 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alexmojaki";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-01-13 08:15:51 +00:00
|
|
|
hash = "sha256-PBvfkv9GQ5Vj5I5SygtmHXtqqHMJ4XgNV1/I+lSU0/U=";
|
2020-07-18 16:06:22 +00:00
|
|
|
};
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
nativeBuildInputs = [
|
2024-01-13 08:15:51 +00:00
|
|
|
setuptools
|
2021-09-18 10:52:07 +00:00
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-12-06 16:07:01 +00:00
|
|
|
asttokens
|
2022-12-17 10:02:37 +00:00
|
|
|
littleutils
|
2023-01-20 10:41:00 +00:00
|
|
|
pytestCheckHook
|
2024-06-05 15:53:02 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.11") [ rich ];
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
disabledTests = [
|
|
|
|
# requires ipython, which causes a circular dependency
|
|
|
|
"test_two_statement_lookups"
|
2024-07-27 06:49:29 +00:00
|
|
|
|
|
|
|
# Asserts against time passed using time.time() to estimate
|
|
|
|
# if the test runs fast enough. That makes the test flaky when
|
|
|
|
# running on slow systems or cross- / emulated building
|
|
|
|
"test_many_source_for_filename_calls"
|
2024-01-13 08:15:51 +00:00
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +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 ];
|
|
|
|
};
|
|
|
|
}
|