nixpkgs/pkgs/development/python-modules/cufflinks/default.nix

60 lines
1.3 KiB
Nix
Raw Normal View History

2019-10-02 04:40:20 +01:00
{ lib, buildPythonPackage, fetchPypi, fetchpatch
, chart-studio
, colorlover
, ipython
, ipywidgets
, nose
, numpy
, pandas
, six
, statsmodels
2017-10-18 15:54:05 +01:00
}:
buildPythonPackage rec {
pname = "cufflinks";
2019-10-02 04:40:20 +01:00
version = "0.16";
2017-10-18 15:54:05 +01:00
src = fetchPypi {
inherit pname version;
2019-10-02 04:40:20 +01:00
sha256 = "163lag5g4micpqm3m4qy9b5r06a7pw45nq80x4skxc7dcrly2ygd";
2017-10-18 15:54:05 +01:00
};
2019-04-03 15:03:54 +01:00
propagatedBuildInputs = [
2019-10-02 04:40:20 +01:00
chart-studio
colorlover
ipython
ipywidgets
numpy
pandas
six
statsmodels
2019-04-03 15:03:54 +01:00
];
2017-10-18 15:54:05 +01:00
patches = [
2019-10-02 04:40:20 +01:00
# Plotly 4 compatibility. Remove with next release, assuming it gets merged.
(fetchpatch {
2019-10-02 04:40:20 +01:00
url = "https://github.com/santosjorge/cufflinks/pull/202/commits/e291dce14181858cb457404adfdaf2624b6d0594.patch";
sha256 = "1l0dahwqn3cxg49v3i3amwi80dmx2bi5zrazmgzpwsfargmk2kd1";
})
];
2019-10-02 04:40:20 +01:00
# in plotly4+, the plotly.plotly module was moved to chart-studio.plotly
postPatch = ''
substituteInPlace requirements.txt \
--replace "plotly>=3.0.0,<4.0.0a0" "chart-studio"
'';
2019-04-03 15:03:54 +01:00
checkInputs = [ nose ];
checkPhase = ''
nosetests -xv tests.py
'';
2017-10-18 15:54:05 +01:00
2019-10-02 04:40:20 +01:00
meta = with lib; {
2017-10-18 15:54:05 +01:00
description = "Productivity Tools for Plotly + Pandas";
2019-10-02 04:40:20 +01:00
homepage = "https://github.com/santosjorge/cufflinks";
license = licenses.mit;
maintainers = with maintainers; [ globin ];
2017-10-18 15:54:05 +01:00
};
}