2021-07-16 19:40:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-06-26 10:26:21 +00:00
|
|
|
, pythonOlder
|
2021-07-16 19:40:57 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, setuptools-scm
|
|
|
|
, toml
|
|
|
|
, pytestCheckHook
|
|
|
|
}:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pure_eval";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "0.2.2";
|
|
|
|
format = "setuptools";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alexmojaki";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-06-26 10:26:21 +00:00
|
|
|
hash = "sha256-9N+UcgAv30s4ctgsBrOHiix4BoXhKPgxH/GOz/NIFdU=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
|
|
|
|
2021-07-16 19:40:57 +00:00
|
|
|
buildInputs = [
|
|
|
|
setuptools-scm
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2021-07-16 19:40:57 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
toml
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-16 19:40:57 +00:00
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"pure_eval"
|
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Safely evaluate AST nodes without side effects";
|
2020-11-30 08:33:03 +00:00
|
|
|
homepage = "https://github.com/alexmojaki/pure_eval";
|
2020-09-25 04:45:31 +00:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
};
|
|
|
|
}
|