mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
python3Packages.ipydatagrid: cleanup, fix
This commit is contained in:
@@ -2,45 +2,59 @@
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pytestCheckHook,
|
||||
|
||||
# nativeBuildInputs
|
||||
yarn-berry_3,
|
||||
|
||||
# build-system
|
||||
hatchling,
|
||||
hatch-jupyter-builder,
|
||||
jupyterlab,
|
||||
|
||||
# dependencies
|
||||
bqplot,
|
||||
ipywidgets,
|
||||
pandas,
|
||||
py2vega,
|
||||
yarn-berry_3,
|
||||
|
||||
# tests
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
let
|
||||
yarn-berry = yarn-berry_3;
|
||||
in
|
||||
|
||||
buildPythonPackage rec {
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "ipydatagrid";
|
||||
version = "1.4.0";
|
||||
pyproject = true;
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "jupyter-widgets";
|
||||
repo = "ipydatagrid";
|
||||
tag = version;
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-6jaIYgLbNXIYzM+mZIVMZ1CXOpcbVK5k9nzGjq5UdLI=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml package.json \
|
||||
--replace-fail 'jlpm' 'yarn'
|
||||
'';
|
||||
|
||||
yarnOfflineCache = yarn-berry_3.fetchYarnBerryDeps {
|
||||
inherit (finalAttrs) src;
|
||||
hash = "sha256-5KZl9mK6xNvy2XdWieH20hEZJ+h/KzvjOfpo78FlWpg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
yarn-berry_3
|
||||
yarn-berry_3.yarnBerryConfigHook
|
||||
];
|
||||
|
||||
build-system = [
|
||||
hatchling
|
||||
hatch-jupyter-builder
|
||||
jupyterlab
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
yarn-berry.yarnBerryConfigHook
|
||||
yarn-berry
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
bqplot
|
||||
ipywidgets
|
||||
@@ -48,25 +62,22 @@ buildPythonPackage rec {
|
||||
py2vega
|
||||
];
|
||||
|
||||
offlineCache = yarn-berry.fetchYarnBerryDeps {
|
||||
inherit src;
|
||||
hash = "sha256-5KZl9mK6xNvy2XdWieH20hEZJ+h/KzvjOfpo78FlWpg=";
|
||||
};
|
||||
|
||||
preConfigure = ''
|
||||
substituteInPlace pyproject.toml package.json \
|
||||
--replace-fail 'jlpm' 'yarn'
|
||||
'';
|
||||
pythonImportsCheck = [ "ipydatagrid" ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# Expects the pandas 2 table schema; pandas 3 tags string columns with `extDtype: "str"`
|
||||
"test_data_object_generation"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Fast Datagrid widget for the Jupyter Notebook and JupyterLab";
|
||||
homepage = "https://github.com/jupyter-widgets/ipydatagrid";
|
||||
changelog = "https://github.com/jupyter-widgets/ipydatagrid/releases/tag/${version}";
|
||||
changelog = "https://github.com/jupyter-widgets/ipydatagrid/releases/tag/${finalAttrs.src.tag}";
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ flokli ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user