python313Packages.shiny: fix tests (#384436)

This commit is contained in:
Robert Schütz
2025-02-23 12:29:06 -08:00
committed by GitHub
4 changed files with 59 additions and 0 deletions
@@ -0,0 +1,41 @@
{
buildPythonPackage,
fetchFromGitHub,
htmltools,
lib,
pytestCheckHook,
setuptools,
}:
buildPythonPackage rec {
pname = "faicons";
version = "0.2.2";
pyproject = true;
src = fetchFromGitHub {
owner = "posit-dev";
repo = "py-faicons";
tag = "v${version}";
hash = "sha256-okkZ8anirjcZcZeB3XjvNJpiYQEau+o6dmCGqFBD8XY=";
};
build-system = [ setuptools ];
dependencies = [
htmltools
];
pythonImportsCheck = [ "faicons" ];
nativeCheckInputs = [
pytestCheckHook
];
meta = {
changelog = "https://github.com/posit-dev/py-faicons/blob/${src.tag}/CHANGELOG.md";
description = "Interface to Font-Awesome for use in Shiny";
homepage = "https://github.com/posit-dev/py-faicons";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
};
}
@@ -10,6 +10,8 @@
# dependencies
babel,
commonmark,
css-inline,
faicons,
htmltools,
importlib-metadata,
importlib-resources,
@@ -25,6 +27,7 @@
pytestCheckHook,
pytest-cov-stub,
requests,
selenium,
shiny,
syrupy,
}:
@@ -49,6 +52,8 @@ buildPythonPackage rec {
dependencies = [
babel
commonmark
css-inline
faicons
htmltools
importlib-metadata
importlib-resources
@@ -67,12 +72,14 @@ buildPythonPackage rec {
pytestCheckHook
pytest-cov-stub
requests
selenium
shiny
syrupy
];
disabledTests = [
# require selenium with chrome driver:
"test_save_custom_webdriver"
"test_save_image_file"
"test_save_non_png"
];
@@ -2,6 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
fetchpatch,
setuptools,
setuptools-scm,
@@ -53,6 +54,14 @@ buildPythonPackage rec {
hash = "sha256-8bo2RHuIP7X7EaOlHd+2m4XU287owchAwiqPnpjKFjI=";
};
patches = [
(fetchpatch {
name = "fix-narwhals-test.patch";
url = "https://github.com/posit-dev/py-shiny/commit/184a9ebd81ff730439513f343576a68f8c1f6eb9.patch";
hash = "sha256-DsGnuHQXODzGwpe8ZUHeXGzRFxxduwxCRk82RJaYZg0=";
})
];
build-system = [
setuptools
setuptools-scm
+2
View File
@@ -4488,6 +4488,8 @@ self: super: with self; {
factory-boy = callPackage ../development/python-modules/factory-boy { };
faicons = callPackage ../development/python-modules/faicons { };
fairscale = callPackage ../development/python-modules/fairscale { };
fairseq = callPackage ../development/python-modules/fairseq { };