diff --git a/pkgs/development/python-modules/extras/default.nix b/pkgs/development/python-modules/extras/default.nix index d73a0c050ea7..a7fd5bbdb958 100644 --- a/pkgs/development/python-modules/extras/default.nix +++ b/pkgs/development/python-modules/extras/default.nix @@ -2,24 +2,36 @@ lib, buildPythonPackage, fetchPypi, + setuptools, + pytestCheckHook, + testtools, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "extras"; version = "1.0.0"; - format = "setuptools"; + pyproject = true; src = fetchPypi { - inherit pname version; - sha256 = "132e36de10b9c91d5d4cc620160a476e0468a88f16c9431817a6729611a81b4e"; + inherit (finalAttrs) pname version; + hash = "sha256-Ey423hC5yR1dTMYgFgpHbgRoqI8WyUMYF6ZylhGoG04="; }; - # error: invalid command 'test' - doCheck = false; + build-system = [ setuptools ]; + + preCheck = '' + substituteInPlace extras/tests/test_extras.py \ + --replace-fail "assertEquals(" "assertEqual(" + ''; + + nativeCheckInputs = [ + pytestCheckHook + testtools + ]; meta = { description = "Useful extra bits for Python - things that should be in the standard library"; homepage = "https://github.com/testing-cabal/extras"; license = lib.licenses.mit; }; -} +})