1{ lib 2, buildPythonPackage 3, pythonOlder 4, fetchFromGitHub 5, hatchling 6, traitlets 7, pytestCheckHook 8}: 9 10buildPythonPackage rec { 11 pname = "jupyter_core"; 12 version = "4.11.2"; 13 disabled = pythonOlder "3.7"; 14 15 format = "pyproject"; 16 17 src = fetchFromGitHub { 18 owner = "jupyter"; 19 repo = "jupyter_core"; 20 rev = version; 21 hash = "sha256-lDhwvhsOxLHBC6CQjCW/rmtHSuMRPC2yaurBd5K3FLc="; 22 }; 23 24 patches = [ 25 ./tests_respect_pythonpath.patch 26 ]; 27 28 nativeBuildInputs = [ 29 hatchling 30 ]; 31 32 propagatedBuildInputs = [ 33 traitlets 34 ]; 35 36 checkInputs = [ 37 pytestCheckHook 38 ]; 39 40 preCheck = '' 41 export HOME=$TMPDIR 42 ''; 43 44 disabledTests = [ 45 # creates a temporary script, which isn't aware of PYTHONPATH 46 "test_argv0" 47 ]; 48 49 postCheck = '' 50 $out/bin/jupyter --help > /dev/null 51 ''; 52 53 pythonImportsCheck = [ "jupyter_core" ]; 54 55 meta = with lib; { 56 description = "Base package on which Jupyter projects rely"; 57 homepage = "https://jupyter.org/"; 58 license = licenses.bsd3; 59 maintainers = with maintainers; [ fridh ]; 60 }; 61}