SHA256
1
0
forked from pool/python-onnx

- Force onnx static build in cmake round to ensure we do not

end up with unresolvable pkg

OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/python-onnx?expand=0&rev=10
This commit is contained in:
Tomáš Chvátal
2020-02-25 11:53:19 +00:00
committed by Git OBS Bridge
parent 3b30d206ba
commit 2001e3d5a2
2 changed files with 10 additions and 0 deletions

View File

@@ -61,11 +61,15 @@ sed -i -e 's:built = False:built = True:g' setup.py
%build
# define same folder like is used for the setup.py later
%define __builddir .setuptools-cmake-build
# Force the cmake to build static libs as otherwise we end
# up with unresolvable package.
%{python_expand # we need to generate for each python
%cmake \
-DONNX_USE_PROTOBUF_SHARED_LIBS=ON \
-DONNX_WERROR=OFF \
-DBUILD_ONNX_PYTHON=ON \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_STATIC_LIBS=ON \
-DPY_EXT_SUFFIX="`$python-config --extension-suffix`"
%cmake_build ; cd ..
}