diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/pyproject-hooks/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/pyproject-hooks/default.nix | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/pyproject-hooks/default.nix b/nixpkgs/pkgs/development/python-modules/pyproject-hooks/default.nix index d751160b54d8..3624b5f02edb 100644 --- a/nixpkgs/pkgs/development/python-modules/pyproject-hooks/default.nix +++ b/nixpkgs/pkgs/development/python-modules/pyproject-hooks/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchPypi , flit-core +, pyproject-hooks , pytestCheckHook , pythonOlder , setuptools @@ -30,17 +31,33 @@ buildPythonPackage rec { tomli ]; - nativeCheckInputs = [ - pytestCheckHook - setuptools - testpath - ]; + # We need to disable tests because this package is part of the bootstrap chain + # and its test dependencies cannot be built yet when this is being built. + doCheck = false; - disabledTests = [ - # fail to import setuptools - "test_setup_py" - "test_issue_104" - ]; + passthru.tests = { + pytest = buildPythonPackage { + pname = "${pname}-pytest"; + inherit version; + format = "other"; + + dontBuild = true; + dontInstall = true; + + nativeCheckInputs = [ + pyproject-hooks + pytestCheckHook + setuptools + testpath + ]; + + disabledTests = [ + # fail to import setuptools + "test_setup_py" + "test_issue_104" + ]; + }; + }; pythonImportsCheck = [ "pyproject_hooks" |