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 pytestFlags = [ "-Wignore::DeprecationWarning" ];
51
52 preCheck = ''
53 export HOME=$(mktemp -d)
54 '';
55
56 disabledTests = [
57 # disable tests depending on network connection
58 "test_develop"
59 "test_install"
60 # Avoid unmaintained "mocker" fixture library, and calls to dependent "build" module
61 "test_build"
62 "test_npm_build"
63 "test_create_cmdclass"
64 "test_ensure_with_skip_npm"
65 ];
66
67 pythonImportsCheck = [ "jupyter_packaging" ];
68
69 meta = with lib; {
70 description = "Jupyter Packaging Utilities";
71 homepage = "https://github.com/jupyter/jupyter-packaging";
72 license = licenses.bsd3;
73 };
74}