2022-09-27 11:47:25 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2024-10-31 10:41:02 +00:00
|
|
|
setuptools,
|
2022-09-27 11:47:25 +00:00
|
|
|
numpy,
|
|
|
|
packaging,
|
|
|
|
protobuf,
|
|
|
|
onnx,
|
|
|
|
unittestCheckHook,
|
|
|
|
onnxruntime,
|
|
|
|
}:
|
|
|
|
|
2023-02-27 01:14:33 +00:00
|
|
|
buildPythonPackage rec {
|
2022-09-27 11:47:25 +00:00
|
|
|
pname = "onnxconverter-common";
|
2023-09-15 12:06:36 +00:00
|
|
|
version = "1.14.0";
|
2022-09-27 11:47:25 +00:00
|
|
|
|
2024-10-31 10:41:02 +00:00
|
|
|
pyproject = true;
|
2022-09-27 11:47:25 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "microsoft";
|
|
|
|
repo = "onnxconverter-common";
|
2023-02-27 01:14:33 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-09-15 12:06:36 +00:00
|
|
|
hash = "sha256-NbHyjLcr/Gq1zRiJW3ZBpEVQGVQGhp7SmfVd5hBIi2o=";
|
2022-09-27 11:47:25 +00:00
|
|
|
};
|
|
|
|
|
2024-10-31 10:41:02 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonRelaxDeps = [ "protobuf" ];
|
|
|
|
|
|
|
|
dependencies = [
|
2022-09-27 11:47:25 +00:00
|
|
|
numpy
|
2023-02-27 01:14:33 +00:00
|
|
|
packaging
|
2022-09-27 11:47:25 +00:00
|
|
|
protobuf
|
|
|
|
onnx
|
|
|
|
];
|
|
|
|
|
2023-10-20 13:34:25 +00:00
|
|
|
pythonImportsCheck = [ "onnxconverter_common" ];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-27 11:47:25 +00:00
|
|
|
onnxruntime
|
|
|
|
unittestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
unittestFlagsArray = [
|
|
|
|
"-s"
|
|
|
|
"tests"
|
|
|
|
];
|
|
|
|
|
|
|
|
# Failing tests
|
|
|
|
# https://github.com/microsoft/onnxconverter-common/issues/242
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "ONNX Converter and Optimization Tools";
|
2023-02-27 01:14:33 +00:00
|
|
|
homepage = "https://github.com/microsoft/onnxconverter-common";
|
|
|
|
changelog = "https://github.com/microsoft/onnxconverter-common/releases/tag/v${version}";
|
2022-09-27 11:47:25 +00:00
|
|
|
license = with lib.licenses; [ mit ];
|
|
|
|
};
|
|
|
|
}
|