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