mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
python312Packages.insightface: disable tests on aarch64 (#351917)
* python312Packages.insightface: enable package for aarch64-linux * python312Packages.insightface: disable passhtru tests for aarch64 * python312Packages.insightface: refactor
This commit is contained in:
parent
6a1c602a16
commit
213114ad23
@ -4,6 +4,7 @@
|
||||
immich,
|
||||
python3,
|
||||
nixosTests,
|
||||
stdenv,
|
||||
}:
|
||||
let
|
||||
python = python3.override {
|
||||
@ -58,6 +59,10 @@ python.pkgs.buildPythonApplication rec {
|
||||
]
|
||||
++ uvicorn.optional-dependencies.standard;
|
||||
|
||||
# aarch64-linux tries to get cpu information from /sys, which isn't available
|
||||
# inside the nix build sandbox.
|
||||
doCheck = stdenv.buildPlatform.system != "aarch64-linux";
|
||||
|
||||
nativeCheckInputs = with python.pkgs; [
|
||||
httpx
|
||||
pytest-asyncio
|
||||
|
@ -58,20 +58,26 @@ buildPythonPackage rec {
|
||||
tqdm
|
||||
];
|
||||
|
||||
# aarch64-linux tries to get cpu information from /sys, which isn't available
|
||||
# inside the nix build sandbox.
|
||||
dontUsePythonImportsCheck = stdenv.buildPlatform.system == "aarch64-linux";
|
||||
|
||||
passthru.tests = lib.optionalAttrs (stdenv.buildPlatform.system != "aarch64-linux") {
|
||||
version = testers.testVersion {
|
||||
package = insightface;
|
||||
command = "insightface-cli --help";
|
||||
# Doesn't support --version but we still want to make sure the cli is executable
|
||||
# and returns the help output
|
||||
version = "help";
|
||||
};
|
||||
};
|
||||
|
||||
pythonImportsCheck = [
|
||||
"insightface"
|
||||
"insightface.app"
|
||||
"insightface.data"
|
||||
];
|
||||
|
||||
passthru.tests.version = testers.testVersion {
|
||||
package = insightface;
|
||||
command = "insightface-cli --help";
|
||||
# Doesn't support --version but we still want to make sure the cli is executable
|
||||
# and returns the help output
|
||||
version = "help";
|
||||
};
|
||||
|
||||
doCheck = false; # Upstream has no tests
|
||||
|
||||
meta = {
|
||||
@ -80,7 +86,5 @@ buildPythonPackage rec {
|
||||
homepage = "https://github.com/deepinsight/insightface";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ oddlama ];
|
||||
# terminate called after throwing an instance of 'onnxruntime::OnnxRuntimeException'
|
||||
broken = stdenv.system == "aarch64-linux";
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user