Add provides and fix build error

Signed-off-by: chendexi <chendexi@kylinos.cn>

update tensorflow.spec.

Signed-off-by: chendexi <chendexi@kylinos.cn>

modify changelog email
This commit is contained in:
chendexi 2022-09-22 06:31:22 +00:00
parent 37354dc209
commit 9d1036792a

View File

@ -1,7 +1,7 @@
%global _empty_manifest_terminate_build 0 %global _empty_manifest_terminate_build 0
Name: tensorflow Name: tensorflow
Version: 2.8.2 Version: 2.8.2
Release: 2 Release: 3
Summary: An Open Source Machine Learning Framework for Everyone Summary: An Open Source Machine Learning Framework for Everyone
License: Apache License 2.0 License: Apache License 2.0
URL: https://www.tensorflow.org/ URL: https://www.tensorflow.org/
@ -23,6 +23,7 @@ TensorFlow provides stable Python and C++ APIs, as well as non-guaranteed backwa
%package -n python3-tensorflow %package -n python3-tensorflow
Summary: An Open Source Machine Learning Framework for Everyone Summary: An Open Source Machine Learning Framework for Everyone
Provides: python-tensorflow Provides: python-tensorflow
Provides: python%{python3_version}dist(tensorflow) = %{version}
#It is because external-$(arch).tar.bz2 is built on bazel 3.5.0 #It is because external-$(arch).tar.bz2 is built on bazel 3.5.0
BuildRequires: bazel == 4.2.1 gcc gcc-c++ git BuildRequires: bazel == 4.2.1 gcc gcc-c++ git
BuildRequires: python3-numpy python3-devel python3-Keras-Preprocessing python3-pip python3-wheel BuildRequires: python3-numpy python3-devel python3-Keras-Preprocessing python3-pip python3-wheel
@ -40,10 +41,10 @@ extdir=$(bazel --output_user_root=`pwd`/../output_user_root info output_base)
mkdir -p ${extdir} mkdir -p ${extdir}
%ifarch aarch64 %ifarch aarch64
cat %{SOURCE1} %{SOURCE2} > external-%{_arch}.tar.bz2 cat %{SOURCE1} %{SOURCE2} > external-%{_arch}.tar.bz2
#endif %endif
%ifarch x86_64 %ifarch x86_64
cat %{SOURCE3} %{SOURCE4} > external-%{_arch}.tar.bz2 cat %{SOURCE3} %{SOURCE4} > external-%{_arch}.tar.bz2
#endif %endif
tar xf external-%{_arch}.tar.bz2 -C ${extdir} tar xf external-%{_arch}.tar.bz2 -C ${extdir}
ln -sfn $(find ${extdir}/../install -name embedded_tools) ${extdir}/external/bazel_tools ln -sfn $(find ${extdir}/../install -name embedded_tools) ${extdir}/external/bazel_tools
ln -sfn $(find ${extdir}/../install -maxdepth 2 -name platforms) ${extdir}/external/platforms ln -sfn $(find ${extdir}/../install -maxdepth 2 -name platforms) ${extdir}/external/platforms
@ -64,6 +65,9 @@ bazel --output_user_root=`pwd`/../output_user_root build --host_copt=-Wno-string
%{_bindir}/* %{_bindir}/*
%changelog %changelog
* Thu Sep 22 2022 chendexi <chendexi@kylinos.cn> -2.8.2-3
- Add provides and fix build error
* Tue Aug 30 2022 zhangshaoning <zhangshaoning@uniontech.com> -2.8.2-2 * Tue Aug 30 2022 zhangshaoning <zhangshaoning@uniontech.com> -2.8.2-2
- fix packaging issue - fix packaging issue