Remove python pack without sys_llvm

(cherry picked from commit 3ca6b51597cc242cb4db6d7399cb1df1d4e1bdf8)
This commit is contained in:
liyunfei 2025-03-03 13:47:38 +00:00 committed by openeuler-sync-bot
parent 6e0512306c
commit de289e8ec8

View File

@ -149,7 +149,7 @@
#region main package #region main package
Name: llvm-toolset-%{maj_ver} Name: llvm-toolset-%{maj_ver}
Version: %{maj_ver}.%{min_ver}.%{patch_ver} Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: 4 Release: 5
Summary: The Low Level Virtual Machine Summary: The Low Level Virtual Machine
License: NCSA License: NCSA
@ -562,7 +562,9 @@ License: Apache-2.0 WITH LLVM-exception OR NCSA
URL: http://lldb.llvm.org/ URL: http://lldb.llvm.org/
Requires: %{pkg_name_clang}-libs%{?_isa} = %{version}-%{release} Requires: %{pkg_name_clang}-libs%{?_isa} = %{version}-%{release}
Requires: %{?scl_prefix}python3-lldb %if %{with sys_llvm}
Requires: python%{python3_pkgversion}-lldb
%endif
%description -n %{pkg_name_lldb} %description -n %{pkg_name_lldb}
LLDB is a next generation, high-performance debugger. It is built as a set LLDB is a next generation, high-performance debugger. It is built as a set
@ -577,15 +579,17 @@ Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release}
%description -n %{pkg_name_lldb}-devel %description -n %{pkg_name_lldb}-devel
The package contains header files for the LLDB debugger. The package contains header files for the LLDB debugger.
%package -n %{?scl_prefix}python3-lldb %if %{with sys_llvm}
%{?python_provide:%python_provide python3-lldb} %package -n python%{python3_pkgversion}-lldb
%{?python_provide:%python_provide python%{python3_pkgversion}-lldb}
Summary: Python module for LLDB Summary: Python module for LLDB
Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release}
%description -n %{?scl_prefix}python3-lldb %description -n python%{python3_pkgversion}-lldb
The package contains the LLDB Python module. The package contains the LLDB Python module.
%endif %endif
%endif
#endregion LLDB packages #endregion LLDB packages
#region MLIR packages #region MLIR packages
@ -617,16 +621,18 @@ Requires: %{pkg_name_mlir}-static%{?_isa} = %{version}-%{release}
%description -n %{pkg_name_mlir}-devel %description -n %{pkg_name_mlir}-devel
MLIR development files. MLIR development files.
%package -n %{?scl_prefix}python3-mlir %if %{with sys_llvm}
%{?python_provide:%python_provide python3-mlir} %package -n python%{python3_pkgversion}-mlir
%{?python_provide:%python_provide python%{python3_pkgversion}-mlir}
Summary: MLIR python bindings Summary: MLIR python bindings
Requires: python3 Requires: python3
Requires: python3-numpy Requires: python%{python3_pkgversion}-numpy
%description -n %{?scl_prefix}python3-mlir %description -n python%{python3_pkgversion}-mlir
MLIR python bindings. MLIR python bindings.
%endif %endif
%endif
#endregion MLIR packages #endregion MLIR packages
#region libcxx packages #region libcxx packages
@ -1391,19 +1397,24 @@ install -D -m 644 -t %{buildroot}%{_mandir}/man1/ lld/docs/ld.lld.1
# python: fix binary libraries location # python: fix binary libraries location
liblldb=$(basename $(readlink -e %{buildroot}%{install_libdir}/liblldb.so)) liblldb=$(basename $(readlink -e %{buildroot}%{install_libdir}/liblldb.so))
%if %{with sys_llvm}
mkdir -p %{buildroot}%{python3_sitearch} mkdir -p %{buildroot}%{python3_sitearch}
mv %{buildroot}%{install_prefix}/..%{python3_sitearch}/lldb %{buildroot}%{python3_sitearch}/lldb mv %{buildroot}%{install_prefix}/..%{python3_sitearch}/lldb %{buildroot}%{python3_sitearch}/lldb
ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so
%py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/lldb %py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/lldb
%endif %endif
rm -rf %{buildroot}%{install_prefix}/..%{python3_sitearch}/lldb
%endif
#endregion LLDB installation #endregion LLDB installation
#region mlir installation #region mlir installation
%if %{with mlir} %if %{with mlir}
%if %{with sys_llvm}
mkdir -p %{buildroot}/%{python3_sitearch} mkdir -p %{buildroot}/%{python3_sitearch}
mv %{buildroot}%{install_prefix}/python_packages/mlir_core/mlir %{buildroot}/%{python3_sitearch} mv %{buildroot}%{install_prefix}/python_packages/mlir_core/mlir %{buildroot}/%{python3_sitearch}
%endif
# These directories should be empty now. # These directories should be empty now.
rmdir %{buildroot}%{install_prefix}/python_packages/mlir_core %{buildroot}%{install_prefix}/python_packages rm -rf %{buildroot}%{install_prefix}/python_packages/mlir_core %{buildroot}%{install_prefix}/python_packages
# Unneeded files. # Unneeded files.
rm -rf %{buildroot}%{install_prefix}/src/python rm -rf %{buildroot}%{install_prefix}/src/python
%endif %endif
@ -2633,9 +2644,11 @@ fi
%files -n %{pkg_name_lldb}-devel %files -n %{pkg_name_lldb}-devel
%{install_includedir}/lldb %{install_includedir}/lldb
%files -n %{?scl_prefix}python3-lldb %if %{with sys_llvm}
%files -n python%{python3_pkgversion}-lldb
%{python3_sitearch}/lldb %{python3_sitearch}/lldb
%endif %endif
%endif
#endregion LLDB files #endregion LLDB files
#region MLIR files #region MLIR files
@ -2705,9 +2718,11 @@ fi
%{install_libdir}/libmlir_runner_utils.so %{install_libdir}/libmlir_runner_utils.so
%{install_libdir}/libMLIR*.so %{install_libdir}/libMLIR*.so
%files -n %{?scl_prefix}python3-mlir %if %{with sys_llvm}
%files -n python%{python3_pkgversion}-mlir
%{python3_sitearch}/mlir/ %{python3_sitearch}/mlir/
%endif %endif
%endif
#endregion MLIR files #endregion MLIR files
#region libcxx files #region libcxx files
@ -2771,6 +2786,9 @@ fi
#endregion files #endregion files
%changelog %changelog
* Mon Mar 3 2025 liyunfei liyunfei33@huawei.com - 18.1.8-5
- Remove python pack without sys_llvm
* Tue Feb 25 2025 liyunfei <liyunfei33@huawei.com> - 18.1.8-4 * Tue Feb 25 2025 liyunfei <liyunfei33@huawei.com> - 18.1.8-4
- Bugfixes for 2203 libomp install & package name - Bugfixes for 2203 libomp install & package name