public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/onnx] test-1.21.0: Initial import (fedora#2154518)
Date: Mon, 08 Jun 2026 15:18:13 GMT [thread overview]
Message-ID: <178093189380.1.11701802057206964967.rpms-onnx-0d56d833d0c9@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/onnx
Branch : test-1.21.0
Commit : 0d56d833d0c9e8ec1ab8addb66624e33acd02001
Author : Alejandro Álvarez Ayllón <a.alvarezayllon@gmail.com>
Date : 2023-05-26T12:57:36+00:00
Stats : +226/-0 in 6 file(s)
URL : https://src.fedoraproject.org/rpms/onnx/c/0d56d833d0c9e8ec1ab8addb66624e33acd02001?branch=test-1.21.0
Log:
Initial import (fedora#2154518)
---
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..aad7474
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+/onnx-1.13.0.tar.gz
diff --git a/onnx-install.patch b/onnx-install.patch
new file mode 100644
index 0000000..7e1a100
--- /dev/null
+++ b/onnx-install.patch
@@ -0,0 +1,67 @@
+commit 7e128fee37ef418248aee2c2fdd72c2c4eed2cc7
+Author: Alejandro Alvarez Ayllon <a.alvarezayllon@gmail.com>
+Date: Thu Dec 8 21:33:23 2022 +0100
+
+ Build shared libraries, fix install
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 4dd56b6e..7f79cc9a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -367,7 +367,7 @@ list(REMOVE_ITEM __tmp_srcs "${ONNX_ROOT}/onnx/cpp2py_export.cc")
+ list(REMOVE_ITEM __tmp_srcs ${onnx_gtests_src})
+ list(APPEND ONNX_SRCS ${__tmp_srcs})
+
+-add_library(onnx_proto ${ONNX_PROTO_SRCS} ${ONNX_PROTO_HDRS})
++add_library(onnx_proto SHARED ${ONNX_PROTO_SRCS} ${ONNX_PROTO_HDRS})
+ add_dependencies(onnx_proto gen_onnx_operators_proto gen_onnx_data_proto)
+ target_include_directories(onnx_proto PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
+@@ -400,6 +400,8 @@ else()
+ set(ONNX_API_DEFINE "-DONNX_API=__attribute__\(\(__visibility__\(\"default\"\)\)\)")
+ set_target_properties(onnx_proto PROPERTIES CXX_VISIBILITY_PRESET hidden)
+ set_target_properties(onnx_proto PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
++ set_target_properties(onnx_proto PROPERTIES VERSION ${ONNX_VERSION}
++ SOVERSION ${ONNX_VERSION})
+ endif()
+ target_compile_definitions(onnx_proto PRIVATE ${ONNX_API_DEFINE})
+
+@@ -423,7 +425,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
+ # So, create a object library
+ add_library(onnx OBJECT ${ONNX_SRCS})
+ else()
+- add_library(onnx ${ONNX_SRCS})
++ add_library(onnx SHARED ${ONNX_SRCS})
++ set_target_properties(onnx PROPERTIES VERSION ${ONNX_VERSION}
++ SOVERSION ${ONNX_VERSION})
+ endif()
+
+ target_include_directories(onnx PUBLIC
+@@ -606,6 +610,17 @@ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/onnx
+ FILES_MATCHING
+ PATTERN "*.h")
+
++install(DIRECTORY ${ONNX_ROOT}/onnx
++ DESTINATION "${PY_SITEARCH}"
++ FILES_MATCHING
++ PATTERN "*.py"
++ PATTERN "test/*" EXCLUDE )
++install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/onnx
++ DESTINATION "${PY_SITEARCH}"
++ FILES_MATCHING
++ PATTERN "*.py"
++ PATTERN "test/*" EXCLUDE )
++
+ configure_file(
+ ${PROJECT_SOURCE_DIR}/cmake/ONNXConfigVersion.cmake.in
+ ${PROJECT_BINARY_DIR}/ONNXConfigVersion.cmake
+@@ -623,6 +638,9 @@ install(EXPORT ONNXTargets DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/ONNX")
+ install(TARGETS
+ onnx onnx_proto
+ EXPORT ONNXTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
++install(TARGETS
++ onnx_cpp2py_export
++ DESTINATION "${PY_SITEARCH}/onnx")
+
+ if(ONNX_BUILD_TESTS)
+ include(${ONNX_ROOT}/cmake/unittest.cmake)
diff --git a/onnx-protobuf.patch b/onnx-protobuf.patch
new file mode 100644
index 0000000..f2fbb0b
--- /dev/null
+++ b/onnx-protobuf.patch
@@ -0,0 +1,9 @@
+diff --git a/requirements.txt b/requirements.txt
+index 5e98ada0..a86af5e3 100644
+--- a/requirements.txt
++++ b/requirements.txt
+@@ -1,3 +1,3 @@
+ numpy >= 1.16.6 # TODO: update once TensorFlow 2.6 is end of life
+-protobuf >= 3.20.2, < 4
++protobuf >= 3.19.4, < 4
+ typing-extensions >= 3.6.2.1
diff --git a/onnx-tox.patch b/onnx-tox.patch
new file mode 100644
index 0000000..2e64f65
--- /dev/null
+++ b/onnx-tox.patch
@@ -0,0 +1,31 @@
+commit 62e47a470ea4bed92077fff03b731e99989707be
+Author: Alejandro Alvarez Ayllon <a.alvarezayllon@gmail.com>
+Date: Thu Dec 8 22:26:12 2022 +0100
+
+ Fix setup.cfg to run during packaging
+
+diff --git a/setup.cfg b/setup.cfg
+index b8983afe..a2db6305 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -1,11 +1,18 @@
+ # SPDX-License-Identifier: Apache-2.0
+
++[tox:tox]
++envlist=py311
++
++[testenv]
++deps=pytest
++commands=pytest
++
+ [aliases]
+ test=pytest
+
+ [tool:pytest]
+-addopts = --nbval --current-env
+-testpaths = onnx/test onnx/examples
++addopts = --ignore=onnx/test/test_backend_test.py --ignore=onnx/test/reference_evaluator_backend_test.py
++testpaths = onnx/test
+
+ [metadata]
+ license_files = LICENSE
diff --git a/onnx.spec b/onnx.spec
new file mode 100644
index 0000000..403aaa3
--- /dev/null
+++ b/onnx.spec
@@ -0,0 +1,117 @@
+%global git_version 1ba785612a79fe749aa1e478336e534743372639
+
+Name: onnx
+Version: 1.13.0
+Release: 3%{?dist}
+Summary: Open standard for machine learning interoperability
+License: Apache-2.0
+
+URL: https://github.com/onnx/onnx
+Source0: https://github.com/onnx/onnx/archive/v%{version}/%{name}-%{version}.tar.gz
+# Build shared libraries and fix install location
+Patch0: onnx-install.patch
+# Add what is missing to run tox, disable tests that require network
+Patch1: onnx-tox.patch
+# Use system protobuf
+Patch2: onnx-protobuf.patch
+
+# Architecture not supported: lots of "unsupported adapters" errors
+ExcludeArch: s390x
+
+BuildRequires: cmake >= 3.13
+BuildRequires: make
+BuildRequires: findutils
+BuildRequires: gcc
+BuildRequires: gcc-c++
+BuildRequires: zlib-devel
+BuildRequires: python3-devel
+BuildRequires: python3-pip
+BuildRequires: python3-pybind11
+BuildRequires: protobuf-lite-devel
+
+%global _description %{expand:
+%{name} provides an open source format for AI models, both deep learning and
+traditional ML. It defines an extensible computation graph model, as well as
+definitions of built-in operators and standard data types.}
+
+%description %_description
+
+%package libs
+Summary: Libraries for %{name}
+
+%description libs %_description
+
+%package devel
+Summary: Development files for %{name}
+Requires: %{name}-libs = %{version}-%{release}
+
+%description devel %_description
+
+%package -n python3-onnx
+Summary: %{summary}
+Requires: %{name}-libs = %{version}-%{release}
+
+%description -n python3-onnx %_description
+
+%prep
+%autosetup -p1 -n onnx-%{version}
+
+%generate_buildrequires
+%pyproject_buildrequires -t
+
+%build
+%cmake \
+ -DONNX_USE_LITE_PROTO=ON \
+ -DONNX_USE_PROTOBUF_SHARED_LIBS=ON \
+ -DBUILD_ONNX_PYTHON=ON \
+ -DPYTHON_EXECUTABLE=%{python3} \
+ -DPY_EXT_SUFFIX=%{python3_ext_suffix} \
+ -DPY_SITEARCH=%{python3_sitearch}
+%cmake_build
+
+%install
+%cmake_install
+# Need to remove empty directories
+find "%{buildroot}/%{_includedir}" -type d -empty -delete
+find "%{buildroot}/%{python3_sitearch}" -type d -empty -delete
+# This file is normally generated by setup.py
+cat > "%{buildroot}/%{python3_sitearch}/%{name}/version.py" <<EOF
+version = "%{version}"
+git_version = "%{git_version}"
+EOF
+# Executable modules
+chmod a+x "%{buildroot}/%{python3_sitearch}/%{name}/gen_proto.py"
+chmod a+x "%{buildroot}/%{python3_sitearch}/%{name}/defs/gen_doc.py"
+%py3_shebang_fix "%{buildroot}/%{python3_sitearch}/%{name}/gen_proto.py"
+%py3_shebang_fix "%{buildroot}/%{python3_sitearch}/%{name}/defs/gen_doc.py"
+
+%check
+export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}
+%tox
+
+%files libs
+%license LICENSE
+%doc README.md
+%{_libdir}/libonnx.so.%{version}
+%{_libdir}/libonnx_proto.so.%{version}
+
+%files devel
+%{_libdir}/libonnx.so
+%{_libdir}/libonnx_proto.so
+%{_libdir}/cmake/ONNX
+%{_includedir}/%{name}/
+
+%files -n python3-onnx
+%{python3_sitearch}/%{name}/
+
+%changelog
+* Thu May 18 2023 Diego Herrera <dherrera@redhat.com> - 1.13.0-3
+- Fix License entry to comply with SPDX
+- Add onnx-libs as an explicit dependency to the python package
+
+* Sat Dec 17 2022 Alejandro Alvarez Ayllon <aalvarez@fedoraproject.org> - 1.13.0-2
+- Release 1.13.0
+
+* Wed Nov 23 2022 Alejandro Alvarez Ayllon <aalvarez@fedoraproject.org> - 1.12.0-1
+- Release 1.12.0
+
diff --git a/sources b/sources
new file mode 100644
index 0000000..3e1cfa1
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (onnx-1.13.0.tar.gz) = 763e67009e3703ad05f550627d94807ab6088f5824c6dde9b209d7e533a1cb2a8025743793dd5d47262af9fae65da94e30d483309873f5aa560c491f17c6550b
reply other threads:[~2026-06-08 15:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178093189380.1.11701802057206964967.rpms-onnx-0d56d833d0c9@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox