Skip to content

Commit

Permalink
test: test bokeh and pillow as well
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Jan 12, 2023
1 parent 1876ae1 commit 2bc6a61
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
16 changes: 11 additions & 5 deletions tests/panel-wheel/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{ lib, poetry2nix, python3, pkgs, runCommand }:
let
wheelImports = {
bokeh = "bokeh";
panel = "panel";
pillow = "PIL";
};
wheelPackages = builtins.attrNames wheelImports;
env = poetry2nix.mkPoetryEnv {
python = python3;
pyproject = ./pyproject.toml;
Expand All @@ -20,10 +26,10 @@ let
}
);
};
areWheels = map
(name: env.python.pkgs.${name}.src.isWheel)
[ "bokeh" "panel" "pillow" ];
areWheels = map (name: env.python.pkgs.${name}.src.isWheel) wheelPackages;
mkImportCall = pkg: "${env}/bin/python -c 'import ${pkg}; print(${pkg}.__version__)' > $out/${pkg}";
in
assert builtins.all lib.id areWheels; runCommand "panel-wheel" { } ''
${env}/bin/python -c 'import panel; print(panel.__version__)' > $out
assert builtins.all lib.id areWheels; runCommand "panel-wheels" { } ''
mkdir -p "$out"
${lib.concatStringsSep "\n" (map (pkg: mkImportCall wheelImports.${pkg}) wheelPackages)}
''
2 changes: 1 addition & 1 deletion tests/panel-wheel/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions tests/panel-wheel/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ authors = ["Your Name <[email protected]>"]
[tool.poetry.dependencies]
python = "^3.9"
panel = "^0.14.2"
pillow = "^9.3.0"
bokeh = "~2.4.3"

[build-system]
requires = ["poetry-core>=1"]
Expand Down

0 comments on commit 2bc6a61

Please sign in to comment.