about summary refs log tree commit diff
path: root/pkgs/development/python-modules/jupyter-packaging/default.nix
blob: 38dd7927d1eb181fd9e6a052556acd963a9d0d03 (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
74
{ lib
, buildPythonPackage
, fetchPypi
, fetchpatch
, deprecation
, hatchling
, pythonOlder
, packaging
, pytestCheckHook
, pytest-timeout
, setuptools
, tomlkit
}:

buildPythonPackage rec {
  pname = "jupyter-packaging";
  version = "0.12.3";
  disabled = pythonOlder "3.7";
  format = "pyproject";

  src = fetchPypi {
    pname = "jupyter_packaging";
    inherit version;
    hash = "sha256-nZsrY7l//WeovFORwypCG8QVsmSjLJnk2NjdMdqunPQ=";
  };

  patches = [
    (fetchpatch {
      name = "setuptools-68-test-compatibility.patch";
      url = "https://github.com/jupyter/jupyter-packaging/commit/e963fb27aa3b58cd70c5ca61ebe68c222d803b7e.patch";
      hash = "sha256-NlO07wBCutAJ1DgoT+rQFkuC9Y+DyF1YFlTwWpwsJzo=";
    })
  ];

  nativeBuildInputs = [
    hatchling
  ];

  propagatedBuildInputs = [
    deprecation
    packaging
    setuptools
    tomlkit
  ];

  nativeCheckInputs = [
    pytestCheckHook
    pytest-timeout
  ];

  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  disabledTests = [
    # disable tests depending on network connection
    "test_develop"
    "test_install"
    # Avoid unmainted "mocker" fixture library, and calls to dependent "build" module
    "test_build"
    "test_npm_build"
    "test_create_cmdclass"
    "test_ensure_with_skip_npm"
  ];

  pythonImportsCheck = [ "jupyter_packaging" ];

  meta = with lib; {
    description = "Jupyter Packaging Utilities";
    homepage = "https://github.com/jupyter/jupyter-packaging";
    license = licenses.bsd3;
    maintainers = [ maintainers.elohmeier ];
  };
}