2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-02-29 20:09:43 +00:00
|
|
|
buildPythonPackage,
|
2024-06-05 15:53:02 +00:00
|
|
|
fetchPypi,
|
2024-02-29 20:09:43 +00:00
|
|
|
fetchpatch,
|
|
|
|
pytestCheckHook,
|
|
|
|
astunparse,
|
2024-06-05 15:53:02 +00:00
|
|
|
setuptools,
|
2024-02-29 20:09:43 +00:00
|
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "import-expression";
|
2024-06-05 15:53:02 +00:00
|
|
|
version = "1.1.5";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit version;
|
|
|
|
pname = "import_expression";
|
|
|
|
hash = "sha256-mVlYj8/I3LFEoHJRds/vbCjH2x/C1oNiUCXmh1FtQME=";
|
2024-02-29 20:09:43 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
dependencies = [ astunparse ];
|
2024-02-29 20:09:43 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
|
|
|
pytestFlagsArray = [ "tests.py" ];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"import_expression"
|
|
|
|
"import_expression._codec"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Transpiles a superset of python to allow easy inline imports";
|
|
|
|
homepage = "https://github.com/ioistired/import-expression-parser";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = with lib.licenses; [
|
|
|
|
mit
|
|
|
|
psfl
|
|
|
|
];
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "import-expression";
|
|
|
|
maintainers = with lib.maintainers; [ lychee ];
|
|
|
|
};
|
|
|
|
}
|