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