diff options
author | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
---|---|---|
committer | Mx Kookie <kookie@spacekookie.de> | 2020-10-31 19:35:09 +0100 |
commit | c4625b175f8200f643fd6e11010932ea44c78433 (patch) | |
tree | bce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/development/python-modules/bokeh | |
parent | 49f735974dd103039ddc4cb576bb76555164a9e7 (diff) | |
parent | d661aa56a8843e991261510c1bb28fdc2f6975ae (diff) |
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie
git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7
git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/bokeh')
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/python-modules/bokeh/default.nix | 100 | ||||
-rw-r--r-- | infra/libkookie/nixpkgs/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch | 15 |
2 files changed, 115 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/bokeh/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/bokeh/default.nix new file mode 100644 index 000000000000..55a01c65f1c2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/bokeh/default.nix @@ -0,0 +1,100 @@ +{ buildPythonPackage +, fetchPypi +, futures +, isPy27 +, isPyPy +, jinja2 +, lib +, mock +, numpy +, nodejs +, packaging +, pillow +#, pytestCheckHook# +, pytest +, python +, python-dateutil +, pyyaml +, selenium +, six +, substituteAll +, tornado +, typing-extensions +, pytz +, flaky +, networkx +, beautifulsoup4 +, requests +, nbconvert +, icalendar +, pandas +, pythonImportsCheckHook +}: + +buildPythonPackage rec { + pname = "bokeh"; + version = "2.2.1"; + + src = fetchPypi { + inherit pname version; + sha256 = "qC6e69eh4uu3+PwerYAv79EKhNrvjsS/yYYSEyOUhVU="; + }; + + patches = [ + (substituteAll { + src = ./hardcode-nodejs-npmjs-paths.patch; + node_bin = "${nodejs}/bin/node"; + npm_bin = "${nodejs}/bin/npm"; + }) + ]; + + disabled = isPyPy || isPy27; + + nativeBuildInputs = [ + pythonImportsCheckHook + ]; + + pythonImportsCheck = [ + "bokeh" + ]; + + checkInputs = [ + mock + pytest + pillow + selenium + pytz + flaky + networkx + beautifulsoup4 + requests + nbconvert + icalendar + pandas + ]; + + propagatedBuildInputs = [ + pillow + jinja2 + python-dateutil + six + pyyaml + tornado + numpy + packaging + typing-extensions + ] + ++ lib.optionals ( isPy27 ) [ + futures + ]; + + # This test suite is a complete pain. Somehow it can't find its fixtures. + doCheck = false; + + meta = { + description = "Statistical and novel interactive HTML plots for Python"; + homepage = "https://github.com/bokeh/bokeh"; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ orivej ]; + }; +} diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch b/infra/libkookie/nixpkgs/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch new file mode 100644 index 000000000000..f8f33c0021f2 --- /dev/null +++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/bokeh/hardcode-nodejs-npmjs-paths.patch @@ -0,0 +1,15 @@ +diff --git a/bokeh/util/compiler.py b/bokeh/util/compiler.py +index a752aad7d..8af05ff63 100644 +--- a/bokeh/util/compiler.py ++++ b/bokeh/util/compiler.py +@@ -442,8 +442,8 @@ def _detect_nodejs(): + raise RuntimeError('node.js v%s or higher is needed to allow compilation of custom models ' % version + + '("conda install nodejs" or follow https://nodejs.org/en/download/)') + +-_nodejs = None +-_npmjs = None ++_nodejs = "@node_bin@" ++_npmjs = "@npm_bin@" + + def _nodejs_path(): + global _nodejs |