depot/third_party/nixpkgs/pkgs/development/python-modules/import-expression/default.nix
Default email 5ca88bfbb9 Project import generated by Copybara.
GitOrigin-RevId: 9f918d616c5321ad374ae6cb5ea89c9e04bf3e58
2024-07-31 10:19:44 +00:00

40 lines
897 B
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pytestCheckHook,
astunparse,
setuptools,
}:
buildPythonPackage rec {
pname = "import-expression";
version = "2.0.0";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "import_expression";
hash = "sha256-Biw7dIOPKbDcqYJSCyeqC/seREcVihSZuaKNFfgjTew=";
};
build-system = [ setuptools ];
dependencies = [ astunparse ];
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";
license = with lib.licenses; [
mit
psfl
];
mainProgram = "import-expression";
maintainers = with lib.maintainers; [ lychee ];
};
}