Index: Makefile.in =================================================================== --- Makefile.in (revision 1869671) +++ Makefile.in (working copy) @@ -935,6 +935,7 @@ @for f in $(SWIG_PY_SRC_DIR)/*.py $(SWIG_PY_DIR)/*.py; do \ ! [ -f "$$f" ] || cp -pf $$f $(SWIG_PY_DIR)/libsvn; \ done + @cd $(SWIG_PY_DIR)/libsvn;ln -sf ../.libs/*.so . @touch $(SWIG_PY_DIR)/libsvn/__init__.py swig-py: autogen-swig-py copy-swig-py Index: build/ac-macros/swig.m4 =================================================================== --- build/ac-macros/swig.m4 (revision 1869671) +++ build/ac-macros/swig.m4 (working copy) @@ -21,7 +21,7 @@ dnl dnl if it is, then check to see if we have the correct version of python. dnl -dnl if we do, then set up the appropriate SWIG_ variables to build the +dnl if we do, then set up the appropriate SWIG_ variables to build the dnl python bindings. AC_DEFUN(SVN_CHECK_SWIG, @@ -69,7 +69,7 @@ fi if test ! -f "$SWIG" || test ! -x "$SWIG"; then AC_MSG_ERROR([Could not find swig binary at $SWIG]) - fi + fi fi if test "$SWIG" != "none"; then @@ -78,7 +78,7 @@ $SED -ne 's/^.*Version \(.*\)$/\1/p'`" # We want the version as an integer so we can test against # which version we're using. SWIG doesn't provide this - # to us so we have to come up with it on our own. + # to us so we have to come up with it on our own. # The major is passed straight through, # the minor is zero padded to two places, # and the patch level is zero padded to three places. @@ -99,7 +99,7 @@ AC_MSG_WARN([Subversion requires SWIG >= 1.3.24]) fi fi - + SWIG_PY_COMPILE="none" SWIG_PY_LINK="none" SWIG_PY_OPTS="none" @@ -140,12 +140,12 @@ ac_cv_python_compile="`$PYTHON ${abs_srcdir}/build/get-py-info.py --compile`" ]) SWIG_PY_COMPILE="$ac_cv_python_compile $CFLAGS" - + AC_CACHE_CHECK([for linking Python extensions], [ac_cv_python_link],[ ac_cv_python_link="`$PYTHON ${abs_srcdir}/build/get-py-info.py --link`" ]) SWIG_PY_LINK="$ac_cv_python_link" - + AC_CACHE_CHECK([for linking Python libraries], [ac_cv_python_libs],[ ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py --libs`" ]) @@ -158,15 +158,28 @@ ]) if test "$ac_cv_python_is_py3" = "yes"; then - SWIG_PY_OPTS="-python -py3" + if test "$SWIG_VERSION" -ge "300010" -a "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -py3" + dnl SWIG Python bindings successfully configured, clear the error message dnl + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -py3 -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + AC_MSG_WARN([Subversion Python bindings for Python 3 require 3.0.10 <= SWIG < 4.0.0]) + fi else - SWIG_PY_OPTS="-python -classic" + if test "$SWIG_VERSION" -lt "400000"; then + SWIG_PY_OPTS="-python -classic" + dnl SWIG Python bindings successfully configured, clear the error message dnl + SWIG_PY_ERRMSG="" + else + SWIG_PY_OPTS="-python -nofastunpack" + SWIG_PY_ERRMSG="SWIG version is not suitable" + AC_MSG_WARN([Subversion Python bindings for Python 2 require 1.3.24 <= SWIG < 4.0.0]) + fi fi + fi - dnl SWIG Python bindings successfully configured, clear the error message - SWIG_PY_ERRMSG="" - fi - fi fi Index: subversion/bindings/swig/INSTALL =================================================================== --- subversion/bindings/swig/INSTALL (revision 1869671) +++ subversion/bindings/swig/INSTALL (working copy) @@ -64,15 +64,34 @@ BUILDING SWIG BINDINGS FOR SVN ON UNIX -Step 1: Install a suitable version of SWIG (which is - currently SWIG version 1.3.24 or later). +Step 1: [Optional] Install a suitable version of SWIG. - * Perhaps your distribution packages a suitable version - if it does - install it, and skip to the last bullet point in this section. + * SWIG installation is optional if you are using a Subversion + distribution tarball, because it contains the source files generated + by SWIG. If you are using a working copy checked out from + Subversion's source repository, or you want to regenerate the SWIG + language bindings source files for some reason, you need a suitable + version of SWIG installed. + * Currently, SWIG versions 2.0.0 and later are supported, with the + following notes: + - SWIG 1.3.24 and later 1.3.x may work, but we do not test these + versions on our latest source code. + - For Python 2 bindings, SWIG 4.0.0 or later is not supported. + - For Python 3 bindings, SWIG 3.0.10 or later is required, but + SWIG 4.0.0 and later is not supported (yet). + - Note that SWIG 3.0.9 has some trouble with Python support. + (See https://sourceforge.net/p/swig/news/2016/06/swig-3010-released/) + - For Perl 5.16 and later, SWIG 2.0.8 or later is required. + - For Ruby bindings, SWIG 3.0.8 is not supported. + + * Perhaps your distribution packages a suitable version. If it does, + install it and skip to the last bullet point in this section. + * Go to http://www.swig.org/, download the source tarball, and unpack. - * In the SWIG-1.3.xx directory, run ./configure. + * In the swig-x.y.z, directory, run ./configure (where x.y.z is + the SWIG version, e.g. 3.0.12). If you plan to build the Python bindings, and have a system with more than one version of Python installed, you may need @@ -95,13 +114,13 @@ Run 'make && make install' * To verify you have SWIG installed correctly, run "swig -version" - from the command line. SWIG should report that it is version 1.3.24 - or newer. + from the command line. SWIG should report that it is one of the + suitable versions mentioned above. Step 1a: Install py3c library if building Python SWIG bindings. - * Check your distribution packages first for a suitable version, and if found - install from there. + * Check your distribution packages first for a suitable version, and + if found install from there. * To install from source, download the latest release from https://github.com/encukou/py3c. @@ -108,7 +127,7 @@ * This is a header-only library, so no configuring or compiling is necessary, simply 'make install'. - + Step 2: Build and Install Subversion. See Subversion's own INSTALL file for details. @@ -140,7 +159,7 @@ Python libraries.) 2. Run 'make check-swig-py' from the top of the Subversion build - tree, to test the bindings + tree, to test the bindings 3. Run 'make install-swig-py' (as root, typically) from the top of the Subversion build tree. This will copy @@ -181,7 +200,7 @@ 1. Run `make swig-pl' from the top of the Subversion build tree. 2. Run `make check-swig-pl' from the top of the Subversion build - tree, to test the bindings + tree, to test the bindings 3. to install run `make install-swig-pl' from the top of the Subversion build tree. @@ -193,9 +212,9 @@ 2. Run `make install-swig-pl-lib' - 3. cd subversion/bindings/swig/perl/native + 3. cd subversion/bindings/swig/perl/native - 4. Run `perl Makefile.PL EXTRAOPTIONSHERE` + 4. Run `perl Makefile.PL EXTRAOPTIONSHERE` 5. Run `make install' @@ -205,7 +224,7 @@ * Ruby - + 1. Run `make swig-rb' from the top of the Subversion build tree, to build the bindings. @@ -212,15 +231,15 @@ 2. Run `make check-swig-rb' from the top of the Subversion build tree, to test the bindings. - 3. To install, run `make install-swig-rb' from the top of the + 3. To install, run `make install-swig-rb' from the top of the Subversion build tree. - You can specify the ruby binary by passing RUBY=/path/to/ruby as part - of the configure command in the top level of the Subversion source - tree. Make sure that the Ruby version used is the same one that you - configured SWIG to run against during the SWIG configure (see above). - + You can specify the ruby binary by passing RUBY=/path/to/ruby as part + of the configure command in the top level of the Subversion source + tree. Make sure that the Ruby version used is the same one that you + configured SWIG to run against during the SWIG configure (see above). + BUILDING SWIG BINDINGS FOR SVN ON WINDOWS @@ -239,7 +258,7 @@ If you plan to build python bindings, you will also need to download and extract the py3c library from https://github.com/encukou/py3c/releases. - + NOTE: Our Python SWIG bindings will currently NOT compile in Debug mode unless you have python24_d.lib (which binary distributions of Python do not contain). Therefore, the Python bindings will only @@ -255,9 +274,9 @@ Example: > gen-make.py --with-swig="C:\Program Files\SWIG-2.0.2" - + If you are building python bindings, point to the py3c directory as well: - + > gen-make.py --with-swig="C:\Program Files\SWIG-2.0.2" \ --with-py3c="C:\SVN\py3c" @@ -343,12 +362,12 @@ * Perl The Perl bindings are using the standard module testing facilities - to do regression tests. Simply run 'make check-swig-pl' as described in + to do regression tests. Simply run 'make check-swig-pl' as described in the install section. * Ruby - To test the Ruby bindings, simply run `make check-swig-rb' as described + To test the Ruby bindings, simply run `make check-swig-rb' as described in the install section.