push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
{
lib,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,
hatchling,
platformdirs,
traitlets,
pip,
pytestCheckHook,
# Reverse dependency
sage,
}:
buildPythonPackage rec {
pname = "jupyter-core";
version = "5.8.1";
disabled = pythonOlder "3.7";
pyproject = true;
src = fetchFromGitHub {
owner = "jupyter";
repo = "jupyter_core";
tag = "v${version}";
hash = "sha256-opTFYVDqzkjeFC+9IZXPRCoV2QCTm1ze6ldrOZN0aUc=";
};
patches = [ ./tests_respect_pythonpath.patch ];
nativeBuildInputs = [ hatchling ];
propagatedBuildInputs = [
platformdirs
traitlets
];
nativeCheckInputs = [
pip
pytestCheckHook
];
preCheck = ''
export HOME=$TMPDIR
'';
pytestFlags = [
# suppress pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
"-Wignore::pytest.PytestUnraisableExceptionWarning"
];
disabledTests = [
# creates a temporary script, which isn't aware of PYTHONPATH
"test_argv0"
];
postCheck = ''
$out/bin/jupyter --help > /dev/null
'';
pythonImportsCheck = [ "jupyter_core" ];
passthru.tests = {
inherit sage;
};
meta = with lib; {
description = "Base package on which Jupyter projects rely";
homepage = "https://jupyter.org/";
changelog = "https://github.com/jupyter/jupyter_core/blob/${src.rev}/CHANGELOG.md";
license = licenses.bsd3;
teams = [ teams.jupyter ];
};
}

View File

@@ -0,0 +1,22 @@
diff --git a/tests/test_command.py b/tests/test_command.py
index a0833c1..67c2110 100644
--- a/tests/test_command.py
+++ b/tests/test_command.py
@@ -191,7 +191,7 @@ def test_not_on_path(tmpdir):
witness_src = "#!{}\n{}\n".format(sys.executable, 'print("WITNESS ME")')
write_executable(witness, witness_src)
- env = {"PATH": ""}
+ env = {"PATH": "", "PYTHONPATH": os.environ["PYTHONPATH"]}
if "SYSTEMROOT" in os.environ: # Windows http://bugs.python.org/issue20614
env["SYSTEMROOT"] = os.environ["SYSTEMROOT"]
if sys.platform == "win32":
@@ -216,7 +216,7 @@ def test_path_priority(tmpdir):
witness_b_src = "#!{}\n{}\n".format(sys.executable, 'print("WITNESS B")')
write_executable(witness_b, witness_b_src)
- env = {"PATH": str(b)}
+ env = {"PATH": str(b), "PYTHONPATH": os.environ["PYTHONPATH"]}
if "SYSTEMROOT" in os.environ: # Windows http://bugs.python.org/issue20614
env["SYSTEMROOT"] = os.environ["SYSTEMROOT"]
if sys.platform == "win32":