summaryrefslogtreecommitdiff
path: root/onnxruntime.spec
diff options
context:
space:
mode:
Diffstat (limited to 'onnxruntime.spec')
-rw-r--r--onnxruntime.spec43
1 files changed, 22 insertions, 21 deletions
diff --git a/onnxruntime.spec b/onnxruntime.spec
index f21b9d9..811c10a 100644
--- a/onnxruntime.spec
+++ b/onnxruntime.spec
@@ -16,11 +16,10 @@ Patch2: 0001-use-system-cpuinfo.patch
Patch3: 0001-use-system-protobuf.patch
Patch4: 0001-use-system-python.patch
Patch5: 0001-remove-nsync.patch
-Patch6: 0002-remove-nsync.patch
-Patch7: 0001-fix-forward-decl-flatbuffers.patch
-Patch8: 0001-add-onnxruntime_INSTALL_UNIT_TESTS-option.patch
-Patch9: 0001-gcc-false-positive.patch
-Patch10: 0001-versioned-onnxruntime_providers_shared.patch
+Patch6: 0001-fix-forward-decl-flatbuffers.patch
+Patch7: 0001-add-onnxruntime_INSTALL_UNIT_TESTS-option.patch
+Patch8: 0001-gcc-false-positive.patch
+Patch9: 0001-versioned-onnxruntime-providers_shared.patch
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@@ -90,6 +89,7 @@ rm -v onnxruntime/test/optimizer/nhwc_transformer_test.cc
# all together into a single shared library when onnxruntime_BUILD_SHARED_LIB is ON.
# The array-bounds and dangling-reference checks have false positives.
%cmake \
+ %_cmake_skip_rpath \
-DCMAKE_INSTALL_LIBDIR=%{_lib} \
-DCMAKE_INSTALL_INCLUDEDIR=%{_includedir} \
-Donnxruntime_BUILD_SHARED_LIB=ON \
@@ -113,45 +113,46 @@ mv ./onnxruntime ./onnxruntime.src
cp -R %{__cmake_build_dir}/onnxruntime ./onnxruntime
cp %{__cmake_build_dir}/requirements.txt ./requirements.txt
-#mkdir -p %{buildroot}/.python_wheel
-#CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" TMPDIR="%{buildroot}/.pyproject-builddir" \
-# %{__python3} -m pip wheel --no-deps --use-pep517 --no-build-isolation --disable-pip-version-check \
-# --no-clean --progress-bar off --verbose \
-# --wheel-dir "%{buildroot}/pyproject-wheeldir"
%pyproject_build
%install
DESTDIR="%{buildroot}" %{__cmake} --install "%{__cmake_build_dir}"
+find %{__cmake_build_dir}/ -name "*.so" -exec cp {} "%{buildroot}/%{_libdir}" \;
+
mkdir -p "%{buildroot}/%{_docdir}/"
cp --preserve=timestamps -r "./docs/" "%{buildroot}/%{_docdir}/%{name}"
-# /usr/bin/python3 -m pip install --root /builddir/build/BUILDROOT/onnxruntime-1.16.3-1.x86_64 \
-# --prefix /usr --no-deps --disable-pip-version-check --progress-bar off --verbose \
-# --ignore-installed --no-warn-script-location --no-index --no-cache-dir \
-# --find-links /builddir/build/BUILD/%{name}-%{version}/build \
-# %{name}==%{version}
+
%pyproject_install
-# %pyproject_save_files onnxruntime
+
%check
export GTEST_FILTER=-CApiTensorTest.load_huge_tensor_with_external_data
-export LT_SYS_LIBRARY_PATH=/usr/lib64
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:%{buildroot}/usr/lib64/
/usr/bin/ctest --test-dir "%{__cmake_build_dir}" --output-on-failure --force-new-ctest-process %{?_smp_mflags}
-# %ctest
%files
%license LICENSE
%doc ThirdPartyNotices.txt
+%{_libdir}/libonnx.so
+%{_libdir}/libonnx_proto.so
%{_libdir}/libonnxruntime.so.%{version}
%{_libdir}/libonnxruntime_providers_shared.so.%{version}
%files devel
%dir %{_includedir}/onnxruntime/
%{_includedir}/onnxruntime/*
-%{_libdir}/libonnxruntime.so
-%{_libdir}/libonnxruntime_providers_shared.so
+%{_libdir}/cmake
+%{_libdir}/*.so*
+# %{_libdir}/libgmock.so.*
+# %{_libdir}/libgtest.so.*
+# %{_libdir}/libonnx_proto.so
+# %{_libdir}/libonnx.so
+# %{_libdir}/libonnxruntime.so
+# %{_libdir}/libonnxruntime_providers_shared.so
%{_libdir}/pkgconfig/libonnxruntime.pc
-%files -n python3-onnxruntime -f %{pyproject_files}
+%files -n python3-onnxruntime
+%{_libdir}/python3.11/site-packages/*
%{_bindir}/onnxruntime_test
%files doc