From 5e33d70d086e3884ab27da96dee513ad8d11e176 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 2 Dec 2026 10:46:51 +0000 Subject: automatic import of tensorflow --- sources | 1 + tensorflow-x86_64.spec | 60 ----------------------------------- tensorflow.spec | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 60 deletions(-) delete mode 100644 tensorflow-x86_64.spec create mode 100644 tensorflow.spec 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-x86_64.spec deleted file mode 100644 index 1741419..0000000 --- a/tensorflow-x86_64.spec +++ /dev/null @@ -1,60 +0,0 @@ -# Prebuilt manylinux wheels are used as Sources because building TensorFlow -# from source requires Bazel plus a version-matched vendored external -# dependency cache (the src-openeuler reference ships one for 2.12.1 only, -# which is incompatible with 2.21.0) and therefore cannot be done offline. -%global debug_package %{nil} -%global __os_install_post %{nil} -%global _empty_manifest_terminate_build 0 - -Name: tensorflow -Version: 2.21.0 -Release: 1%{?dist} -Summary: An Open Source Machine Learning Framework for Everyone -License: Apache-2.0 -URL: https://www.tensorflow.org/ -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 -TensorFlow is an end-to-end open source platform for machine learning. It has -a comprehensive, flexible ecosystem of tools, libraries, and community -resources that lets researchers push the state-of-the-art in ML and developers -easily build and deploy ML-powered applications. - -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 -Provides: python-tensorflow = %{version}-%{release} -BuildRequires: unzip -BuildRequires: python3-devel -BuildRequires: python3-rpm-macros -Requires: python3-numpy -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. - -%prep -%setup -q -c -T -n %{name}-%{version} - -%build - -%install -mkdir -p %{buildroot}%{python3_sitearch} -unzip -q %{SOURCE0} -d %{buildroot}%{python3_sitearch} - -%files -n python3-tensorflow -%{python3_sitearch}/tensorflow -%{python3_sitearch}/tensorflow-*.dist-info - -%changelog -* Wed Dec 02 2026 openEuler AI Importer - 2.21.0-1 -- Initial package for tensorflow 2.21.0 (prebuilt manylinux wheels) diff --git a/tensorflow.spec b/tensorflow.spec new file mode 100644 index 0000000..d0e8848 --- /dev/null +++ b/tensorflow.spec @@ -0,0 +1,85 @@ +# Prebuilt manylinux wheels are used as Sources because building TensorFlow +# from source requires Bazel plus a version-matched vendored external +# dependency cache (the src-openeuler reference ships one for 2.12.1 only, +# which is incompatible with 2.21.0) and therefore cannot be done offline. +%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 +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 +# topdir: none - wheels are prebuilt and unpacked directly into buildroot + +%description +TensorFlow is an end-to-end open source platform for machine learning. It has +a comprehensive, flexible ecosystem of tools, libraries, and community +resources that lets researchers push the state-of-the-art in ML and developers +easily build and deploy ML-powered applications. + +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. + +# 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 +Requires: python3-numpy +Requires: python3-protobuf +Requires: python3-grpcio +Requires: python3-h5py +Requires: python3-Keras +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 +%{python3_sitearch}/tensorflow +%{python3_sitearch}/tensorflow-*.dist-info + +%changelog +* Wed Dec 02 2026 openEuler AI Importer - 2.21.0-1 +- Initial package for tensorflow 2.21.0 (prebuilt manylinux wheels) -- cgit v1.2.3