python312Packages.import-expression: refactor (#348062)

This commit is contained in:
Fabian Affolter 2024-10-12 17:04:05 +02:00 committed by GitHub
commit 18d90160c8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,38 +3,43 @@
buildPythonPackage, buildPythonPackage,
fetchPypi, fetchPypi,
pytestCheckHook, pytestCheckHook,
astunparse, pythonOlder,
setuptools, setuptools,
typing-extensions,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "import-expression"; pname = "import-expression";
version = "2.0.0"; version = "2.0.0";
pyproject = true; pyproject = true;
disabled = pythonOlder "3.9";
src = fetchPypi { src = fetchPypi {
inherit version;
pname = "import_expression"; pname = "import_expression";
inherit version;
hash = "sha256-Biw7dIOPKbDcqYJSCyeqC/seREcVihSZuaKNFfgjTew="; hash = "sha256-Biw7dIOPKbDcqYJSCyeqC/seREcVihSZuaKNFfgjTew=";
}; };
build-system = [ setuptools ]; build-system = [ setuptools ];
dependencies = [ astunparse ];
dependencies = [ typing-extensions ];
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "tests.py" ]; pytestFlagsArray = [ "tests.py" ];
pythonImportsCheck = [ pythonImportsCheck = [ "import_expression" ];
"import_expression"
"import_expression._codec"
];
meta = { meta = {
description = "Transpiles a superset of python to allow easy inline imports"; description = "Transpiles a superset of python to allow easy inline imports";
homepage = "https://github.com/ioistired/import-expression-parser"; homepage = "https://github.com/ioistired/import-expression-parser";
changelog = "https://github.com/ioistired/import-expression/releases/tag/v${version}";
license = with lib.licenses; [ license = with lib.licenses; [
mit mit
psfl psfl
]; ];
mainProgram = "import-expression";
maintainers = with lib.maintainers; [ ]; maintainers = with lib.maintainers; [ ];
mainProgram = "import-expression";
}; };
} }