Hello community, here is the log from the commit of package python-onnx for openSUSE:Leap:15.2 checked in at 2020-02-27 06:42:18 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/python-onnx (Old) and /work/SRC/openSUSE:Leap:15.2/.python-onnx.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-onnx" Thu Feb 27 06:42:18 2020 rev:2 rq:779463 version:1.6.0 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/python-onnx/python-onnx.changes 2020-02-09 11:24:51.891280031 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.python-onnx.new.26092/python-onnx.changes 2020-02-27 06:42:20.977715368 +0100 @@ -1,0 +2,25 @@ +Tue Feb 25 13:57:48 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Add missing dependencies and enable testsuite + +------------------------------------------------------------------- +Tue Feb 25 11:52:59 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Force onnx static build in cmake round to ensure we do not + end up with unresolvable pkg + +------------------------------------------------------------------- +Mon Feb 24 15:43:18 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- 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) + +------------------------------------------------------------------- +Mon Feb 24 14:48:07 UTC 2020 - Tomáš Chvátal <tchva...@suse.com> + +- Force building with system cmake to respect system definitions + and to provide debug information for later on + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-onnx.spec ++++++ --- /var/tmp/diff_new_pack.k4SNtN/_old 2020-02-27 06:42:21.273715984 +0100 +++ /var/tmp/diff_new_pack.k4SNtN/_new 2020-02-27 06:42:21.273715984 +0100 @@ -18,20 +18,22 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 - Name: python-onnx Version: 1.6.0 Release: 0 -Summary: Open Neural Network Exchange +Summary: Open Neural Network eXchange License: MIT -Group: Development/Languages/Python 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 numpy} +BuildRequires: %{python_module protobuf} 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 six} BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc-c++ @@ -42,8 +44,6 @@ Requires: python-protobuf Requires: python-six Requires: python-typing_extensions >= 3.6.2.1 -Suggests: python-mypy >= 0.600 - %python_subpackages %description @@ -51,7 +51,6 @@ %package devel Summary: C/C++ - header files which are used for development -Group: Development/Languages/Python Requires: %{name} = %{version} %description devel @@ -59,9 +58,30 @@ %prep %setup -q -n onnx-%{version} +# avoid bundles +rm -rf third_party +# say that the cmake was already built (we used our macros) +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 -export CFLAGS="%{optflags}" +# 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 .. +} %python_build %install @@ -69,11 +89,16 @@ %python_expand %fdupes %{buildroot}%{$python_sitearch} shebang_files="%{python_sitearch}/onnx/backend/test/stat_coverage.py %{python_sitearch}/onnx/defs/gen_doc.py %{python_sitearch}/onnx/gen_proto.py" for file in $shebang_files ; do - sed -i 's@/usr/bin/env python@/usr/bin/python3@' %{buildroot}/$file + sed -i 's@%{_bindir}/env python@%{_bindir}/python3@' %{buildroot}/$file chmod 755 %{buildroot}/$file done -# check fails with buitling typing of python 3.7.3 -# https://github.com/pybind/pybind11/issues/1949 + +%check +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} %doc README.md