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