python3.pkgs.pyproject-hooks: move tests to passthru

While pyproject-hooks is built using bootstrap packages, none of its
test dependencies should be, so we must move out of the derivation.
This commit is contained in:
Theodore Ni
2023-08-20 10:59:47 +02:00
committed by Frederik Rietdijk
parent 0d7647889c
commit 349f57fb42
@@ -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"