Files
nixpkgs/pkgs/development/python-modules/jupyter-core/default.nix
T
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

74 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
platformdirs,
traitlets,
pip,
pytestCheckHook,
# Reverse dependency
sage,
}:
buildPythonPackage rec {
pname = "jupyter-core";
version = "5.8.1";
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 = {
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 = lib.licenses.bsd3;
teams = [ lib.teams.jupyter ];
};
}