2017-10-23 12:51:38 +02:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2022-10-28 12:24:21 -07:00
|
|
|
, pythonOlder
|
|
|
|
, fetchFromGitHub
|
|
|
|
, hatchling
|
2022-12-30 20:13:21 +01:00
|
|
|
, platformdirs
|
2017-10-23 12:51:38 +02:00
|
|
|
, traitlets
|
2022-03-07 18:28:39 -08:00
|
|
|
, pytestCheckHook
|
2017-10-23 12:51:38 +02:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2023-01-05 00:25:47 +01:00
|
|
|
pname = "jupyter-core";
|
2022-12-30 20:13:21 +01:00
|
|
|
version = "5.1.1";
|
2022-10-28 12:24:21 -07:00
|
|
|
disabled = pythonOlder "3.7";
|
2017-10-23 12:51:38 +02:00
|
|
|
|
2022-10-28 12:24:21 -07:00
|
|
|
format = "pyproject";
|
2017-10-23 12:51:38 +02:00
|
|
|
|
2022-10-28 12:24:21 -07:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jupyter";
|
|
|
|
repo = "jupyter_core";
|
2022-12-30 20:13:21 +01:00
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-54zbo+RXgT9AJabmJYHCznyoinTQqrTORzlM48WpnQQ=";
|
2022-10-28 12:24:21 -07:00
|
|
|
};
|
2017-10-23 12:51:38 +02:00
|
|
|
|
2022-03-07 18:28:39 -08:00
|
|
|
patches = [
|
|
|
|
./tests_respect_pythonpath.patch
|
|
|
|
];
|
2017-10-23 12:51:38 +02:00
|
|
|
|
2022-10-28 12:24:21 -07:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-12-30 20:13:21 +01:00
|
|
|
platformdirs
|
2022-10-28 12:24:21 -07:00
|
|
|
traitlets
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-03-07 18:28:39 -08:00
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
2017-10-23 12:51:38 +02:00
|
|
|
'';
|
|
|
|
|
2022-03-07 18:28:39 -08:00
|
|
|
disabledTests = [
|
|
|
|
# creates a temporary script, which isn't aware of PYTHONPATH
|
|
|
|
"test_argv0"
|
|
|
|
];
|
|
|
|
|
|
|
|
postCheck = ''
|
|
|
|
$out/bin/jupyter --help > /dev/null
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "jupyter_core" ];
|
|
|
|
|
2017-10-23 12:51:38 +02:00
|
|
|
meta = with lib; {
|
2022-10-28 12:24:21 -07:00
|
|
|
description = "Base package on which Jupyter projects rely";
|
2020-03-31 21:11:51 -04:00
|
|
|
homepage = "https://jupyter.org/";
|
2017-10-23 12:51:38 +02:00
|
|
|
license = licenses.bsd3;
|
2019-08-20 19:36:05 +02:00
|
|
|
maintainers = with maintainers; [ fridh ];
|
2017-10-23 12:51:38 +02:00
|
|
|
};
|
|
|
|
}
|