commit python-onnx for openSUSE:Leap:15.2

2020-05-24 Thread root
Hello community,

here is the log from the commit of package python-onnx for openSUSE:Leap:15.2 
checked in at 2020-05-24 18:08:53

Comparing /work/SRC/openSUSE:Leap:15.2/python-onnx (Old)
 and  /work/SRC/openSUSE:Leap:15.2/.python-onnx.new.2738 (New)


Package is "python-onnx"

Sun May 24 18:08:53 2020 rev:6 rq:808443 version:1.6.0

Changes:

--- /work/SRC/openSUSE:Leap:15.2/python-onnx/python-onnx.changes
2020-04-25 19:09:15.168133367 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.python-onnx.new.2738/python-onnx.changes  
2020-05-24 18:08:54.322137156 +0200
@@ -1,0 +2,5 @@
+Thu May 21 06:55:38 UTC 2020 - Petr Gajdos 
+
+- %python3_only -> %python_alternative
+
+---



Other differences:
--
++ python-onnx.spec ++
--- /var/tmp/diff_new_pack.qY0rsR/_old  2020-05-24 18:08:54.722138021 +0200
+++ /var/tmp/diff_new_pack.qY0rsR/_new  2020-05-24 18:08:54.726138029 +0200
@@ -46,6 +46,8 @@
 Requires:   python-protobuf
 Requires:   python-six
 Requires:   python-typing_extensions >= 3.6.2.1
+Requires(post): update-alternatives
+Requires(postun): update-alternatives
 Provides:   python-onnx-devel = %{version}-%{release}
 Obsoletes:  python-onnx-devel < %{version}-%{release}
 %python_subpackages
@@ -71,6 +73,7 @@
 %build
 # define same folder like is used for the setup.py later
 %define __builddir .setuptools-cmake-build
+# FIXME: you should use %%cmake macros
 # Force the cmake to build static libs as otherwise we end
 # up with unresolvable package.
 %{python_expand # we need to generate for each python
@@ -88,6 +91,9 @@
 
 %install
 %python_install
+%python_clone -a %{buildroot}%{_bindir}/backend-test-tools
+%python_clone -a %{buildroot}%{_bindir}/check-node
+%python_clone -a %{buildroot}%{_bindir}/check-model
 %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
@@ -102,12 +108,22 @@
 # 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)'
 
+%post
+%python_install_alternative backend-test-tools
+%python_install_alternative check-node
+%python_install_alternative check-model
+
+%postun
+%python_uninstall_alternative backend-test-tools
+%python_uninstall_alternative check-node
+%python_uninstall_alternative check-model
+
 %files %{python_files}
 %doc README.md
 %license LICENSE
-%python3_only %{_bindir}/check-model
-%python3_only %{_bindir}/check-node
-%python3_only %{_bindir}/backend-test-tools
+%python_alternative %{_bindir}/check-model
+%python_alternative %{_bindir}/check-node
+%python_alternative %{_bindir}/backend-test-tools
 %{python_sitearch}/onnx*
 
 %changelog




commit python-onnx for openSUSE:Leap:15.2

2020-04-25 Thread root
Hello community,

here is the log from the commit of package python-onnx for openSUSE:Leap:15.2 
checked in at 2020-04-25 19:09:10

Comparing /work/SRC/openSUSE:Leap:15.2/python-onnx (Old)
 and  /work/SRC/openSUSE:Leap:15.2/.python-onnx.new.2738 (New)


Package is "python-onnx"

Sat Apr 25 19:09:10 2020 rev:5 rq:797248 version:1.6.0

Changes:

--- /work/SRC/openSUSE:Leap:15.2/python-onnx/python-onnx.changes
2020-04-02 16:47:57.437834571 +0200
+++ /work/SRC/openSUSE:Leap:15.2/.python-onnx.new.2738/python-onnx.changes  
2020-04-25 19:09:15.168133367 +0200
@@ -1,0 +2,12 @@
+Thu Apr 23 11:49:13 UTC 2020 - Tomáš Chvátal 
+
+- Force the interpreter to match the one during build
+- Mypy should use python3 to generate stuff not python2
+  * no-python2.patch
+
+---
+Thu Apr 23 10:35:15 UTC 2020 - Tomáš Chvátal 
+
+- Do not pull in py2 devel of pybind11
+
+---

New:

  no-python2.patch



Other differences:
--
++ python-onnx.spec ++
--- /var/tmp/diff_new_pack.eajUQO/_old  2020-04-25 19:09:15.668134442 +0200
+++ /var/tmp/diff_new_pack.eajUQO/_new  2020-04-25 19:09:15.672134451 +0200
@@ -27,9 +27,11 @@
 Source0:
https://github.com/onnx/onnx/archive/v%{version}.tar.gz#/onnx-%{version}.tar.gz
 Source1:%{name}-rpmlintrc
 Patch0: protobuf.patch
+Patch1: no-python2.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module numpy}
 BuildRequires:  %{python_module protobuf}
+BuildRequires:  %{python_module pybind11-devel}
 BuildRequires:  %{python_module pybind11}
 BuildRequires:  %{python_module pytest-xdist}
 BuildRequires:  %{python_module pytest}
@@ -39,7 +41,6 @@
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++
 BuildRequires:  protobuf-devel
-BuildRequires:  python-pybind11-devel
 BuildRequires:  python-rpm-macros
 Requires:   python-numpy
 Requires:   python-protobuf
@@ -59,7 +60,7 @@
 %setup -q -n onnx-%{version}
 # avoid bundles
 rm -rf third_party
-%patch0 -p1
+%autopatch -p1
 # 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
@@ -79,6 +80,7 @@
   -DBUILD_ONNX_PYTHON=ON \
   -DBUILD_SHARED_LIBS=OFF \
   -DBUILD_STATIC_LIBS=ON \
+  -DPYTHON_EXECUTABLE="%{_bindir}/$python" \
   -DPY_EXT_SUFFIX="`$python-config --extension-suffix`"
 %cmake_build ; cd ..
 }

++ no-python2.patch ++
Index: onnx-1.6.0/tools/protoc-gen-mypy.py
===
--- onnx-1.6.0.orig/tools/protoc-gen-mypy.py
+++ onnx-1.6.0/tools/protoc-gen-mypy.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 
 # Taken from 
https://github.com/dropbox/mypy-protobuf/blob/d984389124eae6dbbb517f766b9266bb32171510/python/protoc-gen-mypy
 # (Apache 2.0 License)



commit python-onnx for openSUSE:Leap:15.2

2020-04-02 Thread root
Hello community,

here is the log from the commit of package python-onnx for openSUSE:Leap:15.2 
checked in at 2020-04-02 16:47:56

Comparing /work/SRC/openSUSE:Leap:15.2/python-onnx (Old)
 and  /work/SRC/openSUSE:Leap:15.2/.python-onnx.new.3248 (New)


Package is "python-onnx"

Thu Apr  2 16:47:56 2020 rev:4 rq:788010 version:1.6.0

Changes:

--- /work/SRC/openSUSE:Leap:15.2/python-onnx/python-onnx.changes
2020-03-20 05:15:16.374562813 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-onnx.new.3248/python-onnx.changes  
2020-04-02 16:47:57.437834571 +0200
@@ -1,0 +2,10 @@
+Mon Mar 23 15:08:10 UTC 2020 - Tomáš Chvátal 
+
+- Do also provide/obsolete for the devel to support migration
+
+---
+Wed Mar 18 09:45:36 UTC 2020 - Christian Goll 
+
+- provide also python-onnx-devel for backcompat 
+
+---
@@ -5,0 +16,6 @@
+
+---
+Wed Mar  4 09:44:15 UTC 2020 - Christian Goll 
+
+- created just one package, as other packages require the 
+  source file within the package



Other differences:
--
++ python-onnx.spec ++
--- /var/tmp/diff_new_pack.HBwyNW/_old  2020-04-02 16:47:58.097837169 +0200
+++ /var/tmp/diff_new_pack.HBwyNW/_new  2020-04-02 16:47:58.097837169 +0200
@@ -45,17 +45,15 @@
 Requires:   python-protobuf
 Requires:   python-six
 Requires:   python-typing_extensions >= 3.6.2.1
+Provides:   python-onnx-devel = %{version}-%{release}
+Obsoletes:  python-onnx-devel < %{version}-%{release}
 %python_subpackages
 
 %description
-Open format to represent deep learning models. With ONNX, AI developers can 
more easily move models between state-of-the-art tools and choose the 
combination that is best for them. ONNX is developed and supported by a 
community of partners.
-
-%package devel
-Summary:C/C++ - header files which are used for development
-Requires:   %{name} = %{version}
-
-%description devel
-The headers and other files needed for the development.
+Open format to represent deep learning models. With ONNX, AI developers can
+more easily move models between state-of-the-art tools and choose the
+combination that is best for them. ONNX is developed and supported by a
+community of partners.
 
 %prep
 %setup -q -n onnx-%{version}
@@ -108,18 +106,6 @@
 %python3_only %{_bindir}/check-model
 %python3_only %{_bindir}/check-node
 %python3_only %{_bindir}/backend-test-tools
-%{python_sitearch}/*
-%exclude %{python_sitearch}/onnx/*.[hc]
-%exclude %{python_sitearch}/onnx/common
-%exclude %{python_sitearch}/onnx/optimizer
-%exclude %{python_sitearch}/onnx/version_converter
-%exclude %{python_sitearch}/onnx/shape_inference
-
-%files %{python_files devel}
-%{python_sitearch}/onnx/*.[hc]
-%{python_sitearch}/onnx/common
-%{python_sitearch}/onnx/optimizer
-%{python_sitearch}/onnx/version_converter
-%{python_sitearch}/onnx/shape_inference
+%{python_sitearch}/onnx*
 
 %changelog




commit python-onnx for openSUSE:Leap:15.2

2020-03-19 Thread root
Hello community,

here is the log from the commit of package python-onnx for openSUSE:Leap:15.2 
checked in at 2020-03-20 05:15:11

Comparing /work/SRC/openSUSE:Leap:15.2/python-onnx (Old)
 and  /work/SRC/openSUSE:Leap:15.2/.python-onnx.new.3160 (New)


Package is "python-onnx"

Fri Mar 20 05:15:11 2020 rev:3 rq:786382 version:1.6.0

Changes:

--- /work/SRC/openSUSE:Leap:15.2/python-onnx/python-onnx.changes
2020-02-27 06:42:20.977715368 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-onnx.new.3160/python-onnx.changes  
2020-03-20 05:15:16.374562813 +0100
@@ -1,0 +2,6 @@
+Sun Mar 15 08:55:22 UTC 2020 - Tomáš Chvátal 
+
+- Add patch to fix build with new protobuf:
+  * protobuf.patch
+
+---

New:

  protobuf.patch



Other differences:
--
++ python-onnx.spec ++
--- /var/tmp/diff_new_pack.xTqynt/_old  2020-03-20 05:15:16.990563228 +0100
+++ /var/tmp/diff_new_pack.xTqynt/_new  2020-03-20 05:15:17.002563235 +0100
@@ -26,6 +26,7 @@
 URL:https://onnx.ai/
 Source0:
https://github.com/onnx/onnx/archive/v%{version}.tar.gz#/onnx-%{version}.tar.gz
 Source1:%{name}-rpmlintrc
+Patch0: protobuf.patch
 BuildRequires:  %{python_module devel}
 BuildRequires:  %{python_module numpy}
 BuildRequires:  %{python_module protobuf}
@@ -60,6 +61,7 @@
 %setup -q -n onnx-%{version}
 # avoid bundles
 rm -rf third_party
+%patch0 -p1
 # 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

++ protobuf.patch ++
>From 7bcb1302352c9953bfc396c3ec2114b382c65614 Mon Sep 17 00:00:00 2001
From: Tongliang Liao 
Date: Fri, 29 Nov 2019 19:48:59 -0800
Subject: [PATCH] python_out does not recognize dllexport_decl.

---
 CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index c7ab64fdda..bf23ac75fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -238,7 +238,7 @@ function(RELATIVE_PROTOBUF_GENERATE_CPP NAME SRCS HDRS 
ROOT_DIR DEPEND)
 ${ONNX_DLLEXPORT_STR}${CMAKE_CURRENT_BINARY_DIR})
 if(BUILD_ONNX_PYTHON)
   list(APPEND PROTOC_ARGS --python_out
-  ${ONNX_DLLEXPORT_STR}${CMAKE_CURRENT_BINARY_DIR})
+  ${CMAKE_CURRENT_BINARY_DIR})
   if(ONNX_GEN_PB_TYPE_STUBS)
 # Haven't figured out how to generate mypy stubs on Windows yet
 if(NOT WIN32)



commit python-onnx for openSUSE:Leap:15.2

2020-02-26 Thread root
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 
+
+- Add missing dependencies and enable testsuite
+
+---
+Tue Feb 25 11:52:59 UTC 2020 - Tomáš Chvátal 
+
+- 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 
+
+- 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 
+
+- 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