From 7005cf7193feee43b9b0e1d2237e66e05ee870ce Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 12 Oct 2024 11:49:16 +0200 Subject: [PATCH] python312Packages.import-expression: refactor --- .../import-expression/default.nix | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/import-expression/default.nix b/pkgs/development/python-modules/import-expression/default.nix index 369495b96e29..6be9824a37a1 100644 --- a/pkgs/development/python-modules/import-expression/default.nix +++ b/pkgs/development/python-modules/import-expression/default.nix @@ -3,38 +3,43 @@ buildPythonPackage, fetchPypi, pytestCheckHook, - astunparse, + pythonOlder, setuptools, + typing-extensions, }: + buildPythonPackage rec { pname = "import-expression"; version = "2.0.0"; pyproject = true; + disabled = pythonOlder "3.9"; + src = fetchPypi { - inherit version; pname = "import_expression"; + inherit version; hash = "sha256-Biw7dIOPKbDcqYJSCyeqC/seREcVihSZuaKNFfgjTew="; }; build-system = [ setuptools ]; - dependencies = [ astunparse ]; + + dependencies = [ typing-extensions ]; + nativeCheckInputs = [ pytestCheckHook ]; + pytestFlagsArray = [ "tests.py" ]; - pythonImportsCheck = [ - "import_expression" - "import_expression._codec" - ]; + pythonImportsCheck = [ "import_expression" ]; meta = { description = "Transpiles a superset of python to allow easy inline imports"; homepage = "https://github.com/ioistired/import-expression-parser"; + changelog = "https://github.com/ioistired/import-expression/releases/tag/v${version}"; license = with lib.licenses; [ mit psfl ]; - mainProgram = "import-expression"; maintainers = with lib.maintainers; [ ]; + mainProgram = "import-expression"; }; }