Accepting request 539598 from home:matejcik:branches:devel:gcc
switch to Python 3 for Tumbleweed 1320 and up OBS-URL: https://build.opensuse.org/request/show/539598 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=173
This commit is contained in:
parent
1350dd5855
commit
0fd48e79d5
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 25 12:14:54 UTC 2017 - jmatejek@suse.com
|
||||
|
||||
- switch to Python 3 for Tumbleweed 1320 and up
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 9 12:43:07 UTC 2017 - matz@suse.com
|
||||
|
||||
|
15
gdb.spec
15
gdb.spec
@ -50,6 +50,13 @@ Obsoletes: devtoolset-1.0-%{pkg_name}
|
||||
%global have_inproctrace 1
|
||||
%endif # %{ix86} x86_64
|
||||
|
||||
# Choose python version
|
||||
%if 0%{?suse_version} >= 1320
|
||||
%define python python3
|
||||
%else
|
||||
%define python python
|
||||
%endif
|
||||
|
||||
# GDB patches have the format `gdb-<version>-bz<red-hat-bz-#>-<desc>.patch'.
|
||||
# They should be created using patch level 1: diff -up ./gdb (or gdb-6.3/gdb).
|
||||
|
||||
@ -303,9 +310,9 @@ BuildRequires: rpm-devel
|
||||
BuildRequires: zlib-devel
|
||||
%if 0%{!?_without_python:1}
|
||||
%if 0%{suse_version} > 1000
|
||||
Requires: python-base
|
||||
Requires: %{python}-base
|
||||
%endif
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: %{python}-devel
|
||||
%endif # 0%{!?_without_python:1}
|
||||
|
||||
%global have_libipt 0
|
||||
@ -754,7 +761,7 @@ $(: ppc64 host build crashes on ppc variant of libexpat.so ) \
|
||||
--without-libexpat-prefix \
|
||||
--enable-tui \
|
||||
%if 0%{!?_without_python:1}
|
||||
--with-python \
|
||||
--with-python=%{_bindir}/%{python} \
|
||||
%else
|
||||
--without-python \
|
||||
%endif
|
||||
@ -988,7 +995,7 @@ mkdir -p $RPM_BUILD_ROOT/usr/lib/debug%{_bindir}
|
||||
cp -p $RPM_BUILD_DIR/%{gdb_src}/gdb/gdb-gdb.py $RPM_BUILD_ROOT/usr/lib/debug%{_bindir}/
|
||||
for pyo in "" "-O";do
|
||||
# RHEL-5: AttributeError: 'module' object has no attribute 'compile_file'
|
||||
python $pyo -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT/usr/lib/debug%{_bindir}"'", 1, "'"/usr/lib/debug%{_bindir}"'"))'
|
||||
%{python} $pyo -c 'import compileall, re, sys; sys.exit (not compileall.compile_dir("'"$RPM_BUILD_ROOT/usr/lib/debug%{_bindir}"'", 1, "'"/usr/lib/debug%{_bindir}"'"))'
|
||||
done
|
||||
%endif # 0%{?_enable_debug_packages:1} && 0%{!?_without_python:1}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user