about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/build/default.nix
blob: 639dc53babf239f66bf47e95d111803b3167aecd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{ lib
, buildPythonPackage
, fetchPypi
, filelock
, flit-core
, importlib-metadata
, isPy3k
, packaging
, pep517
, pytest-mock
, pytest-xdist
, pytestCheckHook
, pythonOlder
, toml
, typing ? null
}:

buildPythonPackage rec {
  pname = "build";
  version = "0.3.0";

  format = "pyproject";

  src = fetchPypi {
    inherit pname version;
    sha256 = "sha256-DrlbLI13DXxMm5LGjCJ8NQu/ZfPsg1UazpCXwYzBX90=";
  };

  nativeBuildInputs = [
    flit-core
  ];

  propagatedBuildInputs = [
    toml
    pep517
    packaging
  ] ++ lib.optionals (!isPy3k) [
    typing
  ] ++ lib.optionals (pythonOlder "3.8") [
    importlib-metadata
  ];

  checkInputs = [
    filelock
    pytestCheckHook
    pytest-mock
    pytest-xdist
  ];

  disabledTests = [
    "test_isolation"
    "test_isolated_environment_install"
    "test_default_pip_is_never_too_old"
    "test_build_isolated - StopIteration"
    "test_build_raises_build_exception"
    "test_build_raises_build_backend_exception"
    "test_projectbuilder.py"
    "test_projectbuilder.py"
  ];

  pythonImportsCheck = [ "build" ];

  meta = with lib; {
    description = "Simple, correct PEP517 package builder";
    longDescription = ''
      build will invoke the PEP 517 hooks to build a distribution package. It
      is a simple build tool and does not perform any dependency management.
    '';
    homepage = "https://github.com/pypa/build";
    maintainers = with maintainers; [ fab ];
    license = licenses.mit;
  };
}