1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 hatch-fancy-pypi-readme,
6 hatch-vcs,
7 hatchling,
8 numpy,
9 pytestCheckHook,
10 pythonOlder,
11}:
12
13buildPythonPackage rec {
14 version = "3.4.0";
15 pname = "opt-einsum";
16 pyproject = true;
17
18 disabled = pythonOlder "3.8";
19
20 src = fetchPypi {
21 pname = "opt_einsum";
22 inherit version;
23 hash = "sha256-lspy8biG0UgkE0h4NJgZTFd/owqPqsEIWGsU8bpEc6w=";
24 };
25
26 build-system = [
27 hatch-fancy-pypi-readme
28 hatch-vcs
29 hatchling
30 ];
31
32 dependencies = [ numpy ];
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 pythonImportsCheck = [ "opt_einsum" ];
37
38 meta = with lib; {
39 description = "Optimizing NumPy's einsum function with order optimization and GPU support";
40 homepage = "https://github.com/dgasmith/opt_einsum";
41 license = licenses.mit;
42 maintainers = with maintainers; [ teh ];
43 };
44}