More Python2/3 improvements.

This commit is contained in:
Joe Orton 2018-03-27 19:07:50 +01:00
parent 826f2c3689
commit 193e2e3a7d
2 changed files with 19 additions and 12 deletions

View File

@ -0,0 +1,11 @@
--- subversion-1.9.7/build/generator/gen_make.py.pybinary
+++ subversion-1.9.7/build/generator/gen_make.py
@@ -507,7 +507,7 @@
standalone.write('top_srcdir = .\n')
standalone.write('top_builddir = .\n')
standalone.write('SWIG = swig\n')
- standalone.write('PYTHON = python\n')
+ standalone.write('PYTHON = ' + sys.executable + '\n')
standalone.write('\n')
standalone.write(open("build-outputs.mk","r").read())
standalone.close()

View File

@ -23,8 +23,10 @@
%if %{with python2}
%global svn_python_sitearch %{python2_sitearch}
%global svn_python %{__python2}
%else
%global svn_python_sitearch %{python3_sitearch}
%global svn_python %{__python3}
%endif
Summary: A Modern Concurrent Version Control System
@ -48,6 +50,7 @@ Patch2: subversion-1.9.0-pie.patch
Patch3: subversion-1.9.4-kwallet.patch
Patch4: subversion-1.8.0-rubybind.patch
Patch5: subversion-1.8.5-swigplWall.patch
Patch6: subversion-1.9.7-pybinary.patch
BuildRequires: autoconf, libtool, texinfo, which
BuildRequires: libdb-devel >= 4.1.25, swig >= 1.3.24, gettext
@ -150,7 +153,7 @@ passwords in the KDE Wallet.
%package -n mod_dav_svn
Group: System Environment/Daemons
Summary: Apache httpd module for Subversion server
Requires: httpd-mmn = %{_httpd_mmn}
Requires: httpd-mmn = %{?_httpd_mmn}
Requires: subversion-libs%{?_isa} = %{version}-%{release}
BuildRequires: httpd-devel >= 2.0.45
@ -211,6 +214,7 @@ This package includes supplementary tools for use with Subversion.
%patch3 -p1 -b .kwallet
%patch4 -p1 -b .rubybind
%patch5 -p1 -b .swigplWall
%patch6 -p1 -b .pybinary
%build
# Regenerate the buildsystem, so that:
@ -220,6 +224,8 @@ This package includes supplementary tools for use with Subversion.
# swig version
# This PATH order makes the fugly test for libtoolize work...
mv build-outputs.mk build-outputs.mk.old
export PYTHON=%{svn_python}
PATH=/usr/bin:$PATH ./autogen.sh --release
# fix shebang lines, #111498
@ -235,12 +241,6 @@ export EXTRA_CFLAGS="$RPM_OPT_FLAGS -DSVN_SQLITE_MIN_VERSION_NUMBER=3007012 \
export APACHE_LDFLAGS="-Wl,-z,relro,-z,now"
export CC=gcc CXX=g++ JAVA_HOME=%{jdk_path}
%if %{with python2}
export PYTHON=/usr/bin/python2
%else
export PYTHON=/usr/bin/python3
%endif
%configure --with-apr=%{_prefix} --with-apr-util=%{_prefix} \
--disable-debug \
--with-swig --with-serf=%{_prefix} \
@ -386,11 +386,7 @@ export LANG=C LC_ALL=C
export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
export MALLOC_PERTURB_=171 MALLOC_CHECK_=3
export LIBC_FATAL_STDERR_=1
%if %{with python2}
export PYTHON=/usr/bin/python2
%else
export PYTHON=/usr/bin/python3
%endif
export PYTHON=%{svn_python}
if ! make check check-swig-pl check-swig-py check-swig-rb CLEANUP=yes; then
: Test suite failure.
cat fails.log