1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 pytestCheckHook,
6 pythonOlder,
7 ipywidgets,
8 jupyter-packaging,
9 jupyterlab,
10 lz4,
11 numpy,
12 pandas,
13 setuptools,
14 traitlets,
15}:
16
17buildPythonPackage rec {
18 pname = "ipytablewidgets";
19 version = "0.3.2";
20 pyproject = true;
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-CGkb//mLUmkyv+hmVJX5+04JGCfw+TtfBxMTXW0bhsw=";
27 };
28
29 # Opened https://github.com/progressivis/ipytablewidgets/issues/3 to ask if
30 # jupyterlab can be updated upstream. (From commits, it looks like it was
31 # set to this version on purpose.) In the meantime, the build still works.
32 #
33 postPatch = ''
34 substituteInPlace pyproject.toml \
35 --replace 'jupyterlab>=3.0.0,<3.7' 'jupyterlab>=3.0.0'
36 '';
37
38 build-system = [
39 jupyter-packaging
40 jupyterlab
41 setuptools
42 ];
43
44 dependencies = [
45 ipywidgets
46 lz4
47 numpy
48 pandas
49 traitlets
50 ];
51
52 nativeCheckInputs = [ pytestCheckHook ];
53
54 pythonImportsCheck = [ "ipytablewidgets" ];
55
56 meta = with lib; {
57 description = "Traitlets and widgets to efficiently data tables (e.g. Pandas DataFrame) using the jupyter notebook";
58 homepage = "https://github.com/progressivis/ipytablewidgets";
59 license = licenses.bsd3;
60 maintainers = with maintainers; [ natsukium ];
61 };
62}