python3Packages.panel: 0.9.7 -> 0.11.1
Since 0.10.0 setup.py the node assets are no longer included in the tarball. During setup, npm is used to first collect assets. Then, a function is bokeh used to bundle the assets. Unfortunately, at that time it attempts to collect files *again*. This we cannot handle so we do not bundle.
This commit is contained in:
@@ -8,19 +8,39 @@
|
||||
, pyct
|
||||
, testpath
|
||||
, tqdm
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
let
|
||||
node = callPackage ./node {};
|
||||
in buildPythonPackage rec {
|
||||
pname = "panel";
|
||||
version = "0.9.7";
|
||||
# Version 10 attempts to download models from the web during build-time
|
||||
# https://github.com/holoviz/panel/issues/1819
|
||||
version = "0.11.1";
|
||||
|
||||
# Don't forget to also update the node packages
|
||||
# 1. retrieve the package.json file
|
||||
# 2. nix shell nixpkgs#nodePackages.node2nix
|
||||
# 3. node2nix
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "2e86d82bdd5e7664bf49558eedad62b664d5403ec9e422e5ddfcf69e3bd77318";
|
||||
sha256 = "ce531e5c0c8a8ae74d523762aeb1666650caebbe1867aba16129d29791e921f9";
|
||||
};
|
||||
|
||||
# Since 0.10.0 panel attempts to fetch from the web.
|
||||
# We avoid this:
|
||||
# - we use node2nix to fetch assets
|
||||
# - we disable bundling (which also tries to fetch assets)
|
||||
# Downside of disabling bundling is that in an airgapped environment
|
||||
# one may miss assets.
|
||||
# https://github.com/holoviz/panel/issues/1819
|
||||
preBuild = ''
|
||||
substituteInPlace setup.py --replace "bundle_resources()" ""
|
||||
pushd panel
|
||||
ln -s ${node.nodeDependencies}/lib/node_modules
|
||||
export PATH="${node.nodeDependencies}/bin:$PATH"
|
||||
popd
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
bokeh
|
||||
param
|
||||
@@ -34,6 +54,10 @@ buildPythonPackage rec {
|
||||
# infinite recursion in test dependencies (hvplot)
|
||||
doCheck = false;
|
||||
|
||||
passthru = {
|
||||
inherit node; # For convenience
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A high level dashboarding library for python visualization libraries";
|
||||
homepage = "https://pyviz.org";
|
||||
|
||||
Reference in New Issue
Block a user