forked from pool/python-onnx
Accepting request 975150 from science:machinelearning
OBS-URL: https://build.opensuse.org/request/show/975150 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-onnx?expand=0&rev=12
This commit is contained in:
1102
3734-enable-python310.patch
Normal file
1102
3734-enable-python310.patch
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,8 +0,0 @@
|
||||
--- onnx-1.10.2/tools/protoc-gen-mypy.py.orig 2022-01-19 10:03:51.018636231 +0100
|
||||
+++ onnx-1.10.2/tools/protoc-gen-mypy.py 2022-01-19 10:04:17.218928895 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
@@ -1,6 +1,2 @@
|
||||
# This line is mandatory to access the configuration functions
|
||||
from Config import *
|
||||
# there are source files which are parsed with pybind11, so they have to be included
|
||||
addFilter("python3-onnx.* devel-file-in-non-devel-package")
|
||||
# special library loader
|
||||
addFilter("libonnxifi_dummy.* lto-no-text-in-archive")
|
||||
|
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue May 3 09:55:18 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add 3734-enable-python310.patch to make the package Python 3.10
|
||||
compatible (gh#onnx/onnx#3734).
|
||||
- Remove no-python2.patch, it is really better to fix shebang
|
||||
with a sed command.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 14 07:29:10 UTC 2022 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
|
@@ -20,8 +20,6 @@
|
||||
%define skip_python2 1
|
||||
# Tumbleweed does not have a python36-numpy anymore: NEP 29 dropped Python 3.6 for NumPy 1.20
|
||||
%define skip_python36 1
|
||||
# onnx 1.10.2 is not yet ready for python 3.10
|
||||
%define skip_python310 1
|
||||
Name: python-onnx
|
||||
Version: 1.10.2
|
||||
Release: 0
|
||||
@@ -30,7 +28,9 @@ License: MIT
|
||||
URL: https://onnx.ai/
|
||||
Source0: https://github.com/onnx/onnx/archive/v%{version}.tar.gz#/onnx-%{version}.tar.gz
|
||||
Source1: %{name}-rpmlintrc
|
||||
Patch1: no-python2.patch
|
||||
# PATCH-FIX-UPSTREAM 3734-enable-python310.patch gh#onnx/onnx#3734 mcepl@suse.com
|
||||
# Make the package Python 3.10 compatible
|
||||
Patch0: 3734-enable-python310.patch
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module numpy}
|
||||
BuildRequires: %{python_module protobuf}
|
||||
@@ -102,9 +102,14 @@ This packages includes the data for testing the backend.
|
||||
|
||||
%prep
|
||||
%setup -q -n onnx-%{version}
|
||||
|
||||
# avoid bundles
|
||||
rm -rf third_party
|
||||
%autopatch -p1
|
||||
|
||||
# fix shebang
|
||||
sed -i "s|^#!\s*%{_bindir}/env python|#!%{_bindir}/python3|" tools/protoc-gen-mypy.py
|
||||
|
||||
# build inside python_expand shuffled build dir also used by the cmake macro instead of upstream's custom dirname
|
||||
sed -i "/^CMAKE_BUILD_DIR = / s/TOP_DIR, '.setuptools-cmake-build'/TOP_DIR, 'build'/" setup.py
|
||||
# do not require extra pytest modules
|
||||
|
Reference in New Issue
Block a user