From b7c632d7fd8efe50c3ecb80b90a8d5e83606c4ee Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 12 Jan 2022 14:49:35 +0100 Subject: [PATCH] python3Packages.opt-einsum: switch to pytestCheckHook --- .../python-modules/opt-einsum/default.nix | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/opt-einsum/default.nix b/pkgs/development/python-modules/opt-einsum/default.nix index 2ded1dfc1961..6e4eabeb68ab 100644 --- a/pkgs/development/python-modules/opt-einsum/default.nix +++ b/pkgs/development/python-modules/opt-einsum/default.nix @@ -1,24 +1,38 @@ -{ buildPythonPackage, fetchPypi, lib, numpy, pytest_4 }: +{ lib +, buildPythonPackage +, fetchPypi +, numpy +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { version = "3.3.0"; - pname = "opt_einsum"; + pname = "opt-einsum"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchPypi { - inherit version pname; - sha256 = "0jb5lia0q742d1713jk33vlj41y61sf52j6pgk7pvhxvfxglgxjr"; + pname = "opt_einsum"; + inherit version; + hash = "sha256-WfZHX3e7w33PfNdIUZwOxgci6R5jyhFOaIIcDFSkZUk="; }; - propagatedBuildInputs = [ numpy ]; + propagatedBuildInputs = [ + numpy + ]; - checkInputs = [ pytest_4 ]; + checkInputs = [ + pytestCheckHook + ]; - checkPhase = '' - pytest - ''; + pythonImportsCheck = [ + "opt_einsum" + ]; meta = with lib; { - description = "Optimizing NumPy's einsum function with order optimization and GPU support."; + description = "Optimizing NumPy's einsum function with order optimization and GPU support"; homepage = "https://github.com/dgasmith/opt_einsum"; license = licenses.mit; maintainers = with maintainers; [ teh ];