1{ lib
2, buildPythonPackage
3, fetchPypi
4, fetchpatch
5, deprecation
6, hatchling
7, pythonOlder
8, packaging
9, pytestCheckHook
10, pytest-timeout
11, setuptools
12, tomlkit
13}:
14
15buildPythonPackage rec {
16 pname = "jupyter-packaging";
17 version = "0.12.3";
18 disabled = pythonOlder "3.7";
19 format = "pyproject";
20
21 src = fetchPypi {
22 pname = "jupyter_packaging";
23 inherit version;
24 hash = "sha256-nZsrY7l//WeovFORwypCG8QVsmSjLJnk2NjdMdqunPQ=";
25 };
26
27 patches = [
28 (fetchpatch {
29 name = "setuptools-68-test-compatibility.patch";
30 url = "https://github.com/jupyter/jupyter-packaging/commit/e963fb27aa3b58cd70c5ca61ebe68c222d803b7e.patch";
31 hash = "sha256-NlO07wBCutAJ1DgoT+rQFkuC9Y+DyF1YFlTwWpwsJzo=";
32 })
33 ];
34
35 nativeBuildInputs = [
36 hatchling
37 ];
38
39 propagatedBuildInputs = [
40 deprecation
41 packaging
42 setuptools
43 tomlkit
44 ];
45
46 nativeCheckInputs = [
47 pytestCheckHook
48 pytest-timeout
49 ];
50
51 preCheck = ''
52 export HOME=$(mktemp -d)
53 '';
54
55 disabledTests = [
56 # disable tests depending on network connection
57 "test_develop"
58 "test_install"
59 # Avoid unmainted "mocker" fixture library, and calls to dependent "build" module
60 "test_build"
61 "test_npm_build"
62 "test_create_cmdclass"
63 "test_ensure_with_skip_npm"
64 ];
65
66 pythonImportsCheck = [ "jupyter_packaging" ];
67
68 meta = with lib; {
69 description = "Jupyter Packaging Utilities";
70 homepage = "https://github.com/jupyter/jupyter-packaging";
71 license = licenses.bsd3;
72 maintainers = [ maintainers.elohmeier ];
73 };
74}