forked from pool/python-onnx
- Remove testing fluff from previous change and properly loop
the cmake call for each python variant - Enable python2 (well rather not explicitly disable it as there is no need for that at the momment) OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/python-onnx?expand=0&rev=9
This commit is contained in:
committed by
Git OBS Bridge
parent
ce82febda3
commit
3b30d206ba
@@ -17,7 +17,6 @@
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%define skip_python2 1
|
||||
Name: python-onnx
|
||||
Version: 1.6.0
|
||||
Release: 0
|
||||
@@ -27,8 +26,7 @@ URL: https://onnx.ai/
|
||||
Source0: https://github.com/onnx/onnx/archive/v%{version}.tar.gz#/onnx-%{version}.tar.gz
|
||||
Source1: %{name}-rpmlintrc
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module nbval}
|
||||
BuildRequires: %{python_module pybind11-devel}
|
||||
BuildRequires: %{python_module pybind11}
|
||||
BuildRequires: %{python_module pytest-runner}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: cmake
|
||||
@@ -63,12 +61,14 @@ 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
|
||||
%{python_expand # we need to generate for each python
|
||||
%cmake \
|
||||
-DONNX_USE_PROTOBUF_SHARED_LIBS=ON \
|
||||
-DONNX_WERROR=OFF \
|
||||
-DBUILD_ONNX_PYTHON=ON \
|
||||
-DPY_EXT_SUFFIX="`python3-config --extension-suffix`"
|
||||
-DPY_EXT_SUFFIX="`$python-config --extension-suffix`"
|
||||
%cmake_build ; cd ..
|
||||
}
|
||||
%python_build
|
||||
|
||||
%install
|
||||
|
Reference in New Issue
Block a user