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 traittypes,
16 wheel,
17}:
18
19buildPythonPackage rec {
20 pname = "ipytablewidgets";
21 version = "0.3.1";
22 format = "pyproject";
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchPypi {
27 inherit pname version;
28 hash = "sha256-14vIih+r/PHLxhgG29YtwuosSBLpewD2CluWpH2+pLc=";
29 };
30
31 # Opened https://github.com/progressivis/ipytablewidgets/issues/3 to ask if
32 # jupyterlab can be updated upstream. (From commits, it looks like it was
33 # set to this version on purpose.) In the meantime, the build still works.
34 #
35 postPatch = ''
36 substituteInPlace pyproject.toml \
37 --replace 'jupyterlab>=3.0.0,<3.7' 'jupyterlab>=3.0.0'
38 '';
39
40 nativeBuildInputs = [
41 jupyter-packaging
42 jupyterlab
43 setuptools
44 wheel
45 ];
46
47 propagatedBuildInputs = [
48 ipywidgets
49 lz4
50 numpy
51 pandas
52 traitlets
53 traittypes
54 ];
55
56 nativeCheckInputs = [ pytestCheckHook ];
57
58 pythonImportsCheck = [ "ipytablewidgets" ];
59
60 meta = with lib; {
61 description = "Traitlets and widgets to efficiently data tables (e.g. Pandas DataFrame) using the jupyter notebook";
62 homepage = "https://github.com/progressivis/ipytablewidgets";
63 license = licenses.bsd3;
64 maintainers = with maintainers; [ natsukium ];
65 };
66}