python312Packages.pymbolic: refactor

This commit is contained in:
Fabian Affolter
2024-10-13 11:09:56 +02:00
committed by Martin Weinelt
parent 7f4af75a43
commit 4bb114b04b
@@ -1,18 +1,23 @@
{
lib,
astunparse,
buildPythonPackage,
fetchPypi,
fetchpatch,
fetchPypi,
immutabledict,
matchpy,
numpy,
pytestCheckHook,
pythonOlder,
pytools,
setuptools,
typing-extensions,
}:
buildPythonPackage rec {
pname = "pymbolic";
version = "2022.2";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.7";
@@ -29,24 +34,34 @@ buildPythonPackage rec {
})
];
propagatedBuildInputs = [ pytools ];
nativeCheckInputs = [
matchpy
pytestCheckHook
];
postPatch = ''
# pytest is a test requirement not a run-time one
substituteInPlace setup.py \
--replace '"pytest>=2.3",' ""
'';
build-system = [ setuptools ];
dependencies = [
astunparse
immutabledict
pytools
typing-extensions
];
optional-dependencies = {
matchpy = [ matchpy ];
numpy = [ numpy ];
};
nativeCheckInputs = [ pytestCheckHook ] ++ lib.flatten (builtins.attrValues optional-dependencies);
pythonImportsCheck = [ "pymbolic" ];
meta = with lib; {
description = "Package for symbolic computation";
homepage = "https://documen.tician.de/pymbolic/";
changelog = "https://github.com/inducer/pymbolic/releases/tag/v${version}";
license = licenses.mit;
maintainers = [ ];
};