1{ lib, buildPythonPackage, fetchPypi, fetchpatch
2, chart-studio
3, colorlover
4, ipython
5, ipywidgets
6, nose
7, numpy
8, pandas
9, six
10, statsmodels
11, isPy38
12}:
13
14buildPythonPackage rec {
15 pname = "cufflinks";
16 version = "0.16";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "163lag5g4micpqm3m4qy9b5r06a7pw45nq80x4skxc7dcrly2ygd";
21 };
22
23 propagatedBuildInputs = [
24 chart-studio
25 colorlover
26 ipython
27 ipywidgets
28 numpy
29 pandas
30 six
31 statsmodels
32 ];
33
34 patches = [
35 # Plotly 4 compatibility. Remove with next release, assuming it gets merged.
36 (fetchpatch {
37 url = "https://github.com/santosjorge/cufflinks/pull/202/commits/e291dce14181858cb457404adfdaf2624b6d0594.patch";
38 sha256 = "1l0dahwqn3cxg49v3i3amwi80dmx2bi5zrazmgzpwsfargmk2kd1";
39 })
40 ];
41
42 # in plotly4+, the plotly.plotly module was moved to chart-studio.plotly
43 postPatch = ''
44 substituteInPlace requirements.txt \
45 --replace "plotly>=3.0.0,<4.0.0a0" "chart-studio"
46 '';
47
48 checkInputs = [ nose ];
49
50 checkPhase = ''
51 nosetests -xv tests.py
52 '';
53
54 meta = with lib; {
55 description = "Productivity Tools for Plotly + Pandas";
56 homepage = "https://github.com/santosjorge/cufflinks";
57 license = licenses.mit;
58 maintainers = with maintainers; [ globin ];
59 broken = isPy38;
60 };
61}