1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, numpy
5, packaging
6, protobuf
7, onnx
8, unittestCheckHook
9, onnxruntime
10}:
11
12buildPythonPackage rec {
13 pname = "onnxconverter-common";
14 version = "1.14.0";
15
16 format = "setuptools";
17
18 src = fetchFromGitHub {
19 owner = "microsoft";
20 repo = "onnxconverter-common";
21 rev = "refs/tags/v${version}";
22 hash = "sha256-NbHyjLcr/Gq1zRiJW3ZBpEVQGVQGhp7SmfVd5hBIi2o=";
23 };
24
25 propagatedBuildInputs = [
26 numpy
27 packaging
28 protobuf
29 onnx
30 ];
31
32 pythonImportsCheck = [
33 "onnxconverter_common"
34 ];
35
36 nativeCheckInputs = [
37 onnxruntime
38 unittestCheckHook
39 ];
40
41 unittestFlagsArray = [ "-s" "tests" ];
42
43 # Failing tests
44 # https://github.com/microsoft/onnxconverter-common/issues/242
45 doCheck = false;
46
47 meta = {
48 description = "ONNX Converter and Optimization Tools";
49 homepage = "https://github.com/microsoft/onnxconverter-common";
50 changelog = "https://github.com/microsoft/onnxconverter-common/releases/tag/v${version}";
51 maintainers = with lib.maintainers; [ fridh ];
52 license = with lib.licenses; [ mit ];
53 };
54}