python311Packages.onnx: protobuf 3.x -> 4.x

This commit is contained in:
happysalada
2023-09-18 19:58:56 +00:00
committed by Yt
parent ad07cd4fc2
commit 8e11eef314
2 changed files with 15 additions and 1 deletions
@@ -13,6 +13,7 @@
, pythonOlder
, tabulate
, typing-extensions
, abseil-cpp
}:
let
@@ -36,6 +37,10 @@ in buildPythonPackage rec {
pybind11
];
buildInputs = [
abseil-cpp
];
propagatedBuildInputs = [
protobuf
numpy
@@ -61,6 +66,10 @@ in buildPythonPackage rec {
--replace 'include(googletest)' ""
substituteInPlace cmake/unittest.cmake \
--replace 'googletest)' ')'
# remove this override in 1.15 that will enable to set the CMAKE_CXX_STANDARD with cmakeFlags
substituteInPlace CMakeLists.txt \
--replace 'CMAKE_CXX_STANDARD 11' 'CMAKE_CXX_STANDARD 17'
'';
preConfigure = ''
+6 -1
View File
@@ -7518,7 +7518,12 @@ self: super: with self; {
onlykey-solo-python = callPackage ../development/python-modules/onlykey-solo-python { };
onnx = callPackage ../development/python-modules/onnx {
protobuf = protobuf3;
# in linux c++ defaults to 17
# on darwin clang is on an old version so c++ defaults to 11
abseil-cpp = if stdenv.isLinux then
pkgs.abseil-cpp_202301
else
pkgs.abseil-cpp_202301.override { cxxStandard = "17"; };
};
onnxconverter-common = callPackage ../development/python-modules/onnxconverter-common {