Files
nixpkgs/pkgs/development/python-modules/anywidget/default.nix
T
Martin Weinelt e44e596b0a python3Packages.anywidget: 0.9.18 -> 0.9.21
https://github.com/manzt/anywidget/releases/tag/anywidget%400.9.21

This commit was automatically generated using update-python-libraries.
2026-02-01 16:41:39 +01:00

79 lines
1.7 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pytestCheckHook,
writableTmpDirAsHomeHook,
hatch-jupyter-builder,
hatchling,
ipykernel,
ipywidgets,
psygnal,
pydantic,
typing-extensions,
watchfiles,
}:
buildPythonPackage rec {
pname = "anywidget";
version = "0.9.21";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-uNAXICmsQmVzBTxBbGpYeDhmFhIgi7OQ+gYHhi5ZSyc=";
};
# We do not need the jupyterlab build dependency, because we do not need to
# build any JS components; these are present already in the PyPI artifact.
#
postPatch = ''
substituteInPlace pyproject.toml \
--replace '"jupyterlab==3.*"' ""
'';
build-system = [
hatch-jupyter-builder
hatchling
];
dependencies = [
ipywidgets
psygnal
typing-extensions
];
nativeCheckInputs = [
pytestCheckHook
ipykernel
pydantic
watchfiles
writableTmpDirAsHomeHook
];
disabledTests = [
# requires package.json
"test_version"
# AssertionError: assert not {140737277121872: <MockComm id='140737277118512'>}
"test_descriptor_with_psygnal"
"test_descriptor_with_pydantic"
"test_descriptor_with_msgspec"
"test_descriptor_with_traitlets"
"test_infer_file_contents"
# assert not {<function _connect_psygnal.<locals>._disconnect at 0x7ffff3617e...
"test_descriptor_with_psygnal"
];
pythonImportsCheck = [ "anywidget" ];
meta = {
description = "Custom jupyter widgets made easy";
homepage = "https://github.com/manzt/anywidget";
changelog = "https://github.com/manzt/anywidget/releases/tag/anywidget%40${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
};
}