summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--0003-system-flatbuffers.patch22
-rw-r--r--python-onnxruntime.spec28
2 files changed, 7 insertions, 43 deletions
diff --git a/0003-system-flatbuffers.patch b/0003-system-flatbuffers.patch
deleted file mode 100644
index d965f54..0000000
--- a/0003-system-flatbuffers.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-diff --git a/cmake/external/onnxruntime_external_deps.cmake b/cmake/external/onnxruntime_external_deps.cmake
-index 8e412c7847..1e971e5b27 100644
---- a/cmake/external/onnxruntime_external_deps.cmake
-+++ b/cmake/external/onnxruntime_external_deps.cmake
-@@ -103,7 +103,7 @@ FetchContent_Declare(
- URL ${DEP_URL_flatbuffers}
- URL_HASH SHA1=${DEP_SHA1_flatbuffers}
- PATCH_COMMAND ${ONNXRUNTIME_FLATBUFFERS_PATCH_COMMAND}
-- FIND_PACKAGE_ARGS 1.12.0...<2.0.0 NAMES Flatbuffers
-+ FIND_PACKAGE_ARGS 1.12.0...<2.0.0 NAMES FlatBuffers
- )
-
- # Download a protoc binary from Internet if needed
-@@ -342,6 +342,8 @@ namespace std { using ::getenv; }
- target_compile_options(flatc PRIVATE /FI${CMAKE_BINARY_DIR}/gdk_cstdlib_wrapper.h)
- endif()
- endif()
-+else()
-+ add_library(flatbuffers::flatbuffers ALIAS flatbuffers::flatbuffers_shared)
- endif()
-
- if (onnxruntime_BUILD_UNIT_TESTS)
diff --git a/python-onnxruntime.spec b/python-onnxruntime.spec
index 7a2af85..1d79634 100644
--- a/python-onnxruntime.spec
+++ b/python-onnxruntime.spec
@@ -1,11 +1,11 @@
-%global pypi_name onnxruntime
-%global pypi_version 1.16.3
+%global pkg_name onnxruntime
+%global pkg_version 1.16.3
%global pkg_summary ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
%global pkg_description %{expand:
%{pkg_summary}}
-Name: %{pypi_name}
-Version: %{pypi_version}
+Name: %{pkg_name}
+Version: %{pkg_version}
Release: 1
Summary: %{pkg_summary}
@@ -17,26 +17,11 @@ Source1: 3rd_party.tar.gz
Patch0: 0001-dont-install-tests.patch
Patch1: 0002-use-system-python.patch
-Patch2: 0003-system-flatbuffers.patch
BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: g++
-BuildRequires: flatbuffers
-BuildRequires: ccache
-BuildRequires: libedit-devel
-BuildRequires: abseil-cpp-devel
-BuildRequires: boost-devel
-BuildRequires: bzip2
-BuildRequires: flatbuffers-compiler
-BuildRequires: flatbuffers-devel
-BuildRequires: gmock-devel
-BuildRequires: gsl-devel
-BuildRequires: gtest-devel
-BuildRequires: protobuf-devel
-BuildRequires: re2-devel
-BuildRequires: zlib-devel
-BuildRequires: eigen3-devel
+BuildRequires: gcc-c++
BuildRequires: pybind11-devel
BuildRequires: python3-devel
@@ -72,9 +57,10 @@ Summary: Documentation files for the %{name} package
Documentation files for the %{name} package
%prep
-%autosetup -p1 -n %{pypi_name}-%{pypi_version}
+%autosetup -p1 -n %{pkg_name}-%{pkg_version}
rm -r cmake/external
tar -xzf %{SOURCE1} --directory=.
+python3 tools/ci_build/replace_urls_in_deps.py --new_dir deps
%build
# Re-generate flatbuffer headers