forked from pool/python-onnx
- Add missing dependencies and enable testsuite
OBS-URL: https://build.opensuse.org/package/show/science:machinelearning/python-onnx?expand=0&rev=11
This commit is contained in:
committed by
Git OBS Bridge
parent
2001e3d5a2
commit
067eb5f36a
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 25 13:57:48 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Add missing dependencies and enable testsuite
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 25 11:52:59 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
Tue Feb 25 11:52:59 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
@@ -17,18 +17,23 @@
|
|||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
|
%define skip_python2 1
|
||||||
Name: python-onnx
|
Name: python-onnx
|
||||||
Version: 1.6.0
|
Version: 1.6.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Open Neural Network Exchange
|
Summary: Open Neural Network eXchange
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://onnx.ai/
|
URL: https://onnx.ai/
|
||||||
Source0: https://github.com/onnx/onnx/archive/v%{version}.tar.gz#/onnx-%{version}.tar.gz
|
Source0: https://github.com/onnx/onnx/archive/v%{version}.tar.gz#/onnx-%{version}.tar.gz
|
||||||
Source1: %{name}-rpmlintrc
|
Source1: %{name}-rpmlintrc
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
|
BuildRequires: %{python_module numpy}
|
||||||
|
BuildRequires: %{python_module protobuf}
|
||||||
BuildRequires: %{python_module pybind11}
|
BuildRequires: %{python_module pybind11}
|
||||||
BuildRequires: %{python_module pytest-runner}
|
BuildRequires: %{python_module pytest-xdist}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module six}
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@@ -57,6 +62,10 @@ The headers and other files needed for the development.
|
|||||||
rm -rf third_party
|
rm -rf third_party
|
||||||
# say that the cmake was already built (we used our macros)
|
# say that the cmake was already built (we used our macros)
|
||||||
sed -i -e 's:built = False:built = True:g' setup.py
|
sed -i -e 's:built = False:built = True:g' setup.py
|
||||||
|
# do not require extra pytest modules
|
||||||
|
sed -i -e '/addopts/d' setup.cfg
|
||||||
|
# do not pull in pytest-runner as it is deprecated
|
||||||
|
sed -i -e '/pytest-runner/d' setup.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# define same folder like is used for the setup.py later
|
# define same folder like is used for the setup.py later
|
||||||
@@ -85,7 +94,11 @@ for file in $shebang_files ; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
%check
|
%check
|
||||||
#%%pytest_arch
|
export PYTHONDONTWRITEBYTECODE=1
|
||||||
|
# copy inplace for tests
|
||||||
|
cp %{__builddir}/*cpp2py* ./onnx/
|
||||||
|
# skip online tests
|
||||||
|
%pytest_arch -n auto -k 'not (test_bvlc_alexnet_cpu or test_shufflenet_cpu or test_densenet121_cpu or test_squeezenet_cpu or test_inception_v1_cpu or test_vgg19_cpu or test_inception_v2_cpu or test_zfnet512_cpu or test_resnet50_cpu)'
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%doc README.md
|
%doc README.md
|
||||||
|
Reference in New Issue
Block a user