%define debug_package %{nil} %define _binaries_in_noarch_packages_terminate_build 0 Name: mindspore Version: 2.0.0 Release: 1%{?dist} Summary: Tensors and Dynamic neural networks in Python with strong Huawei Ascend acceleration License: Apache-2.0 URL: https://mindspore.cn/ Source0: https://gitee.com/mindspore/mindspore/repository/archive/v2.0.0.zip Source1: third_party.tar.gz Patch0: 0001-patch-for-openeuler.patch BuildRequires: cmake gcc gcc-c++ automake autoconf libtool numactl-devel perl flex git BuildRequires: python3-devel BuildRequires: python3dist(setuptools) BuildRequires: python3dist(wheel) BuildRequires: python3dist(packaging) Requires: python3dist(pip) %global _description %{expand: MindSpore is a an open AI framework that best matches with Ascend processors and supports multi-processor architectures. it provides many features, including: - Tensor computation with Huawei Ascend acceleration - Support both eager mode and graph mode with swift shift between two modes - Support auto-parallel - Support deploying on Cloud, Edge and IoT devices } %description %_description %package -n python3-mindspore Summary: Tensors and Dynamic neural networks in Python with strong Huawei Ascend acceleration %{?python_provide:%python_provide python-mindspore} BuildRequires: cmake gcc gcc-c++ python3-devel python3-pip python3-wheel numactl-devel perl Requires: openmpi Requires: python3dist(asttokens) >= 2.0.4 Requires: python3dist(astunparse) >= 1.6.3 Requires: python3dist(numpy) >= 1.17 Requires: python3dist(packaging) >= 20 Requires: python3dist(pillow) >= 6.2 Requires: python3dist(protobuf) >= 3.13 Requires: python3dist(psutil) >= 5.6.1 Requires: python3dist(scipy) >= 1.5.4 %description -n python3-mindspore %_description %prep %setup -q -n mindspore-v2.0.0 %setup -T -D -a 1 -q -n mindspore-v2.0.0 %patch0 -p1 %build export CC=/usr/bin/gcc export CXX=/usr/bin/g++ ./build.sh -e cpu -j 16 %install rm -rf %{buildroot}/%{python3_sitelib}/ mkdir -p %{buildroot}/%{python3_sitelib}/ export QA_SKIP_RPATHS=1 mkdir dist find . -name 'mindspore*.whl' find . -name 'mindspore*.whl' -exec cp {} dist/ \; find dist/ -name 'mindspore*.whl' -exec basename {} \; | xargs -I {} %py3_install_wheel {} %files -n python3-mindspore %license LICENSE %doc README.md %defattr(755,root,root,-) %{python3_sitelib}/* %{_bindir}/* %changelog * Wed Mar 15 2023 li_zengyi - 2.0.0-1 - init MindSpore 2.0.0 rpm package