Use python3-scons instead of python2 scons

This commit is contained in:
Honza Horak 2018-07-13 16:09:57 +02:00
parent 07ab6ddca2
commit d3e3b83558
2 changed files with 23 additions and 2 deletions

17
galera-python3.patch Normal file
View File

@ -0,0 +1,17 @@
Upstream PR:
https://github.com/codership/galera/pull/512
diff -up galera-25.3.23/SConstruct.bak galera-25.3.23/SConstruct
--- galera-25.3.23/SConstruct.bak 2018-07-13 15:14:49.059835554 +0200
+++ galera-25.3.23/SConstruct 2018-07-13 15:19:07.717967794 +0200
@@ -194,8 +194,8 @@ if link != 'default':
env.Replace(LINK = link)
# Get compiler name/version, CXX may be set to "c++" which may be clang or gcc
-cc_version = read_first_line(env['CC'].split() + ['--version'])
-cxx_version = read_first_line(env['CXX'].split() + ['--version'])
+cc_version = read_first_line(env['CC'].split() + ['--version']).decode()
+cxx_version = read_first_line(env['CXX'].split() + ['--version']).decode()
print('Using C compiler executable: ' + env['CC'])
print('C compiler version is: ' + cc_version)

View File

@ -15,7 +15,9 @@ Source0: http://releases.galeracluster.com/source/%{name}-%{version}.tar.
Source1: garbd.service
Source2: garbd-wrapper
BuildRequires: boost-devel check-devel openssl-devel scons systemd gcc-c++
Patch0: galera-python3.patch
BuildRequires: boost-devel check-devel openssl-devel python3-scons systemd gcc-c++
%if 0%{?rhel}
Provides: bundled(asio)
%else
@ -38,13 +40,14 @@ replication engine see http://www.codership.com.
%prep
%setup -q
%patch0 -p1
%build
CPPFLAGS="%{optflags}"
CPPFLAGS=`echo $CPPFLAGS| sed -e "s|-Wp,-D_GLIBCXX_ASSERTIONS||g" `
export CPPFLAGS
scons %{?_smp_mflags} strict_build_flags=0
scons-3 %{?_smp_mflags} strict_build_flags=0
%install
@ -92,6 +95,7 @@ install -D -m 644 scripts/packages/README-MySQL %{buildroot}%{_docdir}/galera/RE
%changelog
* Fri Jul 13 2018 Honza Horak <hhorak@redhat.com> - 25.3.23-4
- Add explicit gcc-c++ BR
- Use python3-scons
* Fri Jul 13 2018 Honza Horak <hhorak@redhat.com> - 25.3.23-3
- Do not require asio on rhel