diff --git a/llvm-toolset-18.spec b/llvm-toolset-18.spec index a47a365dea221e2bd3923a6faf80cb594bfe4886..04e08a498e30d60583eef5ffd00b4b04b51b3ee4 100644 --- a/llvm-toolset-18.spec +++ b/llvm-toolset-18.spec @@ -149,7 +149,7 @@ #region main package Name: llvm-toolset-%{maj_ver} Version: %{maj_ver}.%{min_ver}.%{patch_ver} -Release: 4 +Release: 5 Summary: The Low Level Virtual Machine License: NCSA @@ -562,7 +562,9 @@ License: Apache-2.0 WITH LLVM-exception OR NCSA URL: http://lldb.llvm.org/ 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} 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 The package contains header files for the LLDB debugger. -%package -n %{?scl_prefix}python3-lldb -%{?python_provide:%python_provide python3-lldb} +%if %{with sys_llvm} +%package -n python%{python3_pkgversion}-lldb +%{?python_provide:%python_provide python%{python3_pkgversion}-lldb} Summary: Python module for LLDB 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. %endif +%endif #endregion LLDB packages #region MLIR packages @@ -617,16 +621,18 @@ Requires: %{pkg_name_mlir}-static%{?_isa} = %{version}-%{release} %description -n %{pkg_name_mlir}-devel MLIR development files. -%package -n %{?scl_prefix}python3-mlir -%{?python_provide:%python_provide python3-mlir} +%if %{with sys_llvm} +%package -n python%{python3_pkgversion}-mlir +%{?python_provide:%python_provide python%{python3_pkgversion}-mlir} Summary: MLIR python bindings 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. %endif +%endif #endregion MLIR 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 liblldb=$(basename $(readlink -e %{buildroot}%{install_libdir}/liblldb.so)) +%if %{with sys_llvm} mkdir -p %{buildroot}%{python3_sitearch} mv %{buildroot}%{install_prefix}/..%{python3_sitearch}/lldb %{buildroot}%{python3_sitearch}/lldb ln -vsf "../../../${liblldb}" %{buildroot}%{python3_sitearch}/lldb/_lldb.so %py_byte_compile %{__python3} %{buildroot}%{python3_sitearch}/lldb %endif +rm -rf %{buildroot}%{install_prefix}/..%{python3_sitearch}/lldb +%endif #endregion LLDB installation #region mlir installation %if %{with mlir} +%if %{with sys_llvm} mkdir -p %{buildroot}/%{python3_sitearch} mv %{buildroot}%{install_prefix}/python_packages/mlir_core/mlir %{buildroot}/%{python3_sitearch} +%endif # 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. rm -rf %{buildroot}%{install_prefix}/src/python %endif @@ -2633,9 +2644,11 @@ fi %files -n %{pkg_name_lldb}-devel %{install_includedir}/lldb -%files -n %{?scl_prefix}python3-lldb +%if %{with sys_llvm} +%files -n python%{python3_pkgversion}-lldb %{python3_sitearch}/lldb %endif +%endif #endregion LLDB files #region MLIR files @@ -2705,9 +2718,11 @@ fi %{install_libdir}/libmlir_runner_utils.so %{install_libdir}/libMLIR*.so -%files -n %{?scl_prefix}python3-mlir +%if %{with sys_llvm} +%files -n python%{python3_pkgversion}-mlir %{python3_sitearch}/mlir/ %endif +%endif #endregion MLIR files #region libcxx files @@ -2771,6 +2786,9 @@ fi #endregion files %changelog +* Mon Mar 3 2025 liyunfei liyunfei33@huawei.com - 18.1.8-5 +- Remove python pack without sys_llvm + * Tue Feb 25 2025 liyunfei - 18.1.8-4 - Bugfixes for 2203 libomp install & package name