- Make sure we also rewrite /usr/bin/python3 and not just

/usr/bin/python.
- Use correct conditional for lldb python bindings.

OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm18?expand=0&rev=22
This commit is contained in:
Aaron Puchert 2024-08-21 17:16:15 +00:00 committed by Git OBS Bridge
parent d4c29faf97
commit e82017e2cb

View File

@ -1361,7 +1361,7 @@ cat > %{buildroot}%{_rpmconfigdir}/macros.d/macros.llvm <<EOF
EOF EOF
# Don't use env in shebangs, and prefer python3.X. (https://www.python.org/dev/peps/pep-0394/#for-python-runtime-distributors) # Don't use env in shebangs, and prefer python3.X. (https://www.python.org/dev/peps/pep-0394/#for-python-runtime-distributors)
sed -i "1s|/usr/bin/env *|%{_bindir}/|;1s|/usr/bin/python\$|$(realpath /usr/bin/python3)|" \ sed -i -E '1s|/usr/bin/env *|/usr/bin/|; 1s|/usr/bin/python3?\$|$(realpath /usr/bin/python3)|" \
%if %{_plv} == %{_sonum} %if %{_plv} == %{_sonum}
%{buildroot}%{_bindir}/{{analyze,intercept}-build,clang-{format,tidy}-diff,git-clang-format,hmaptool,run-{clang-tidy,find-all-symbols},scan-{build,build-py,view}} \ %{buildroot}%{_bindir}/{{analyze,intercept}-build,clang-{format,tidy}-diff,git-clang-format,hmaptool,run-{clang-tidy,find-all-symbols},scan-{build,build-py,view}} \
%{buildroot}%{_libexecdir}/{{analyze,intercept}-{c++,cc},{c++,ccc}-analyzer} \ %{buildroot}%{_libexecdir}/{{analyze,intercept}-{c++,cc},{c++,ccc}-analyzer} \
@ -1376,7 +1376,7 @@ sed -i '1{ /^#!/d }' \
%if %{_plv} == %{_sonum} %if %{_plv} == %{_sonum}
%{buildroot}%{_datadir}/scan-view/{Reporter,startfile}.py \ %{buildroot}%{_datadir}/scan-view/{Reporter,startfile}.py \
%endif %endif
%if %{with lldb} %if %{with lldb_python}
%{buildroot}%{python3_sitearch}/lldb/utils/{in_call_stack,symbolication}.py \ %{buildroot}%{python3_sitearch}/lldb/utils/{in_call_stack,symbolication}.py \
%endif %endif
%{buildroot}%{python3_sitelib}/optrecord.py %{buildroot}%{python3_sitelib}/optrecord.py