Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / pyproject-hooks / default.nix
blob3624b5f02edb25c2a3a325e08db9e0c38cc29e61
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , flit-core
5 , pyproject-hooks
6 , pytestCheckHook
7 , pythonOlder
8 , setuptools
9 , testpath
10 , tomli
13 buildPythonPackage rec {
14   pname = "pyproject-hooks";
15   version = "1.0.0";
16   format = "pyproject";
18   disabled = pythonOlder "3.7";
20   src = fetchPypi rec {
21     pname = "pyproject_hooks";
22     inherit version;
23     hash = "sha256-8nGymLl/WVXVP7ErcsH7GUjCLBprcLMVxUztrKAmTvU=";
24   };
26   nativeBuildInputs = [
27     flit-core
28   ];
30   propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [
31     tomli
32   ];
34   # We need to disable tests because this package is part of the bootstrap chain
35   # and its test dependencies cannot be built yet when this is being built.
36   doCheck = false;
38   passthru.tests = {
39     pytest = buildPythonPackage {
40       pname = "${pname}-pytest";
41       inherit version;
42       format = "other";
44       dontBuild = true;
45       dontInstall = true;
47       nativeCheckInputs = [
48         pyproject-hooks
49         pytestCheckHook
50         setuptools
51         testpath
52       ];
54       disabledTests = [
55         # fail to import setuptools
56         "test_setup_py"
57         "test_issue_104"
58       ];
59     };
60   };
62   pythonImportsCheck = [
63     "pyproject_hooks"
64   ];
66   meta = with lib; {
67     description = "Low-level library for calling build-backends in `pyproject.toml`-based project ";
68     homepage = "https://github.com/pypa/pyproject-hooks";
69     changelog = "https://github.com/pypa/pyproject-hooks/blob/v${version}/docs/changelog.rst";
70     license = licenses.mit;
71     maintainers = teams.python.members;
72   };