summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2026-12-02 10:46:51 +0000
committerCoprDistGit <infra@openeuler.org>2026-12-02 10:46:51 +0000
commit5e33d70d086e3884ab27da96dee513ad8d11e176 (patch)
tree37b4bd4aab73e8e41c0ba0e55a58bb75434975fc
parentc22d3271ab3874aae74d26c44e18284b72a45888 (diff)
automatic import of tensorflowopeneuler25.09
-rw-r--r--sources1
-rw-r--r--tensorflow.spec (renamed from tensorflow-x86_64.spec)41
2 files changed, 34 insertions, 8 deletions
diff --git a/sources b/sources
index 494191b..f645578 100644
--- a/sources
+++ b/sources
@@ -1 +1,2 @@
+e280ee38999f714997dd400103abdaee tensorflow-2.21.0-cp311-cp311-manylinux_2_27_aarch64.whl
9b216dc27c95392ac1a34f02df647187 tensorflow-2.21.0-cp311-cp311-manylinux_2_27_x86_64.whl
diff --git a/tensorflow-x86_64.spec b/tensorflow.spec
index 1741419..d0e8848 100644
--- a/tensorflow-x86_64.spec
+++ b/tensorflow.spec
@@ -5,6 +5,17 @@
%global debug_package %{nil}
%global __os_install_post %{nil}
%global _empty_manifest_terminate_build 0
+# The wheel METADATA declares `libclang>=13`, so pythondistdeps emits a hard
+# `python3.11dist(libclang)` requirement. openEuler ships the libclang support
+# as the `python3-libclang` compatibility shim, which exposes only the
+# unversioned `python3dist(libclang)` capability (backed by python3-clang +
+# clang-libs); no package provides the versioned `python3.11dist(libclang)`
+# capability, so that auto-generated requirement is unsatisfiable. TensorFlow
+# never imports clang/libclang at runtime (it is only referenced by the wheel's
+# packaging tooling), and the official openEuler tensorflow carries no libclang
+# dependency. Keep the real dependency on python3-libclang and drop only the
+# unprovidable versioned capability so the package is repo-closed.
+%global __requires_exclude ^python3\\.11dist\\(libclang\\)
Name: tensorflow
Version: 2.21.0
@@ -12,8 +23,9 @@ Release: 1%{?dist}
Summary: An Open Source Machine Learning Framework for Everyone
License: Apache-2.0
URL: https://www.tensorflow.org/
+Source0: https://mirrors.aliyun.com/pypi/packages/26/a1/23b9b39c046c723db63a1c2c93397703efa3400a36f98d9c717b473aafb8/tensorflow-%{version}-cp311-cp311-manylinux_2_27_x86_64.whl
+Source1: https://mirrors.aliyun.com/pypi/packages/9c/7c/57b7ee953b40d5d837136d20af6851b20ea6ca63753fc05699e8bcfab6d5/tensorflow-%{version}-cp311-cp311-manylinux_2_27_aarch64.whl
ExclusiveArch: x86_64 aarch64
-Source0: https://mirrors.aliyun.com/pypi/packages/26/a1/23b9b39c046c723db63a1c2c93397703efa3400a36f98d9c717b473aafb8/tensorflow-2.21.0-cp311-cp311-manylinux_2_27_x86_64.whl
# topdir: none - wheels are prebuilt and unpacked directly into buildroot
%description
@@ -26,9 +38,12 @@ TensorFlow was originally developed by researchers and engineers working on
the Google Brain team within Google's Machine Intelligence Research
organization to conduct machine learning and deep neural networks research.
-%package -n python3-tensorflow
-Summary: An Open Source Machine Learning Framework for Everyone
+# The install root is produced as the main `tensorflow` package so that the
+# package the CI/consumers install by the source name (`tensorflow`) actually
+# exists. The conventional Python names are kept as virtual provides for
+# backward compatibility with dependents that require python3-tensorflow.
Provides: python-tensorflow = %{version}-%{release}
+Provides: python3-tensorflow = %{version}-%{release}
BuildRequires: unzip
BuildRequires: python3-devel
BuildRequires: python3-rpm-macros
@@ -37,21 +52,31 @@ Requires: python3-protobuf
Requires: python3-grpcio
Requires: python3-h5py
Requires: python3-Keras
-
-%description -n python3-tensorflow
-TensorFlow is an end-to-end open source platform for machine learning. This
-package provides the TensorFlow Python 3 bindings.
+Requires: python3-libclang >= 13.0.0
%prep
+# Create (but do not populate) the build directory; sources are prebuilt
+# wheels that are unpacked straight into the buildroot in %%install.
%setup -q -c -T -n %{name}-%{version}
+%ifarch x86_64
+cp -f %{SOURCE0} .
+%endif
+%ifarch aarch64
+cp -f %{SOURCE1} .
+%endif
%build
%install
mkdir -p %{buildroot}%{python3_sitearch}
+%ifarch x86_64
unzip -q %{SOURCE0} -d %{buildroot}%{python3_sitearch}
+%endif
+%ifarch aarch64
+unzip -q %{SOURCE1} -d %{buildroot}%{python3_sitearch}
+%endif
-%files -n python3-tensorflow
+%files
%{python3_sitearch}/tensorflow
%{python3_sitearch}/tensorflow-*.dist-info