python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / pyproject-hooks / default.nix
blob180886e462d00ccaf4abe08e0b35e1a3b6c66605
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   flit-core,
6   pyproject-hooks,
7   pytestCheckHook,
8   pythonOlder,
9   setuptools,
10   testpath,
11   tomli,
14 buildPythonPackage rec {
15   pname = "pyproject-hooks";
16   version = "1.2.0";
17   format = "pyproject";
19   disabled = pythonOlder "3.7";
21   src = fetchPypi rec {
22     pname = "pyproject_hooks";
23     inherit version;
24     hash = "sha256-HoWb1cQPrpRIZC3Yca30WeXiCEGG6NLCp5qCTJcNofg=";
25   };
27   nativeBuildInputs = [ flit-core ];
29   propagatedBuildInputs = lib.optionals (pythonOlder "3.11") [ tomli ];
31   # We need to disable tests because this package is part of the bootstrap chain
32   # and its test dependencies cannot be built yet when this is being built.
33   doCheck = false;
35   passthru.tests = {
36     pytest = buildPythonPackage {
37       pname = "${pname}-pytest";
38       inherit version;
39       format = "other";
41       dontBuild = true;
42       dontInstall = true;
44       nativeCheckInputs = [
45         pyproject-hooks
46         pytestCheckHook
47         setuptools
48         testpath
49       ];
51       disabledTests = [
52         # fail to import setuptools
53         "test_setup_py"
54         "test_issue_104"
55       ];
56     };
57   };
59   pythonImportsCheck = [ "pyproject_hooks" ];
61   meta = with lib; {
62     description = "Low-level library for calling build-backends in `pyproject.toml`-based project";
63     homepage = "https://github.com/pypa/pyproject-hooks";
64     changelog = "https://github.com/pypa/pyproject-hooks/blob/v${version}/docs/changelog.rst";
65     license = licenses.mit;
66     maintainers = teams.python.members;
67   };