Checkout Tools
  • last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Support building with SWIG 4 on Python 3.x

* build/ac-macros/swig.m4

(SVN_FIND_SWIG): Allow building with SWIG 4+, and add -modern option

when Python 3 and SWIG 3.x are detected.

* subversion/bindings/swig/include/proxy.py

Use _get_instance_attr and _set_instance_attr.

* subversion/bindings/swig/include/proxy.swg

(_get_instance_attr): New function to get an instance attribute

without metadata for new-style and old-style classes.

(_set_instance_attr): New function to set an instance attribute for

new-style and old-style classes.

* subversion/bindings/swig/INSTALL

(BUILDING SWIG BINDINGS FOR SVN ON UNIX, Step 1): Update supported

SWIG versions for Python 3 bindings (remove the note that SWIG 4+

is not supported).

Patch by: Jun Omae <jun66j5_{AT}_gmail.com>

Review by: brane

futatuki

julianfoad

  1. … 3 more files in changeset.
Restrict SWIG version for Python bindings

* Makefile.in (copy-swig-py:):

Make symbolic links to C extension modules in build/test directory

(for check-swig-py with SWIG 3.0.9 and SWIG 4.0 or later)

* build/ac-macros/swig.m4:

Add SWIG version check for Python 2 and Python 3 to check its version

is suitable for Python bindings, and to set up appropriate SWIG option.

Review by: hartmannathan

* subversion/bindings/swig/INSTALL

(BUILDING SWIG BINDINGS FOR SVN ON UNIX, Step1):

- Add description that SWIG installation is optional.

- Update suitable SWIG version information per language bindings.

(BUILDING SWIG BINDINGS FOR SVN ON UNIX, Step1a): Fold long line.

(USING SWIG BINDINGS, Python): Update URLs for ViewVC and Trac.

  1. … 2 more files in changeset.
Merge the swig-py3 branch to trunk.
  1. … 61 more files in changeset.
Get rid of apr_int64_t format string check in swig py configure.

This check relied on APR implementation details and broke with APR 1.7.0.

Rather than trying to guess a perfect format string to use, just use the

largest possible format and cast the argument accordingly.

Should fix build against APR 1.7.0 and later.

Suggested by: brane

* build/ac-macros/swig.m4: Remove code related to SVN_APR_INT64_T_PYCFMT.

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

(svn_swig_py_client_blame_receiver_func): Stop relying on the

SVN_APR_INT64_T_PYCFMT constant from configure. Use "L" and

acast to PY_LONG_LONG instead.

  1. … 1 more file in changeset.
* build/ac-macros/swig.m4

(SVN_FIND_SWIG): Warn on the combination of swig-3.0.8 --with-ruby due to

a known issue.

* build/ac-macros/swig.m4: Revert r1751167, since it broke use of pre-generated

Swig bindings in release builds.

* build/ac-macros/swig.m4: Filter standard library directories from

SWIG_PL_LINK, as already done for the other swig bindings.

Pass explicit linker flags to the Perl bindings build.

This unbreaks 'make check-swig-pl' in cases where the libsvn libraries

being tested are not installed in the standard system library search path.

With another set of libsvn libraries present on the system, the Perl

bindings would get linked to that set, and the tests would fail crashing

left and right.

* build/ac-macros/swig.m4

(SVN_FIND_SWIG): Ask Perl which LD flags to use for linking extensions.

Expose these flags in a new SWIG_PL_LINK variable.

* subversion/bindings/swig/perl/native/Makefile.PL.in

(config): Pass LDFLAGS and LDDLFLAGS explicitly, adding our local

libraries to the linker's command line, instead of using whatever

defaults the Perl installation happens to use.

  1. … 1 more file in changeset.
* build/ac-macros/swig.m4:

(SVN_FIND_SWIG): Configure the swig bindings only if swig has been enabled.

[Note from the future; reverted in r1829260]

Fix Python bindings with SWIG < 3.0.6, followup on 1721488.

“%pythoncode { ... }” had to be changed to “%pythoncode %{ ... %}” to avoid

macro expansion (done in r1721488). This was a latent bug in the bindings

exposed by stricter parsing in SWIG 3.x.

However, there was a bug in SWIG through 3.0.6 which would remove part of the

commented lines inside the “%pythoncode %{ ... %}” block. This caused the

"right" fix to break everywhere except 3.0.6+.

As discussed in the SWIG bug tracker[0], an alternative form of the pythoncode

directive can be used to inline the contents of a specified file. Use of this

form works in all supported SWIG versions.

[0]: https://github.com/swig/swig/issues/379#issuecomment-107664345

* subversion/bindings/swig/include/proxy.swg:

(proxy_pythoncode): Copy %pythoncode contents to ...

* subversion/bindings/swig/include/proxy.py:

... new file which is included in proxy.swg via “%pythoncode "..."”

directive.

* build/ac-macros/swig.m4

subversion/bindings/swig/INSTALL:

Remove 3.x related SWIG restrictions. All SWIG versions are supported again.

  1. … 3 more files in changeset.
Enable building bindings with SWIG >= 3.0.6

This reinstates r1690591 and adds the minimum version checks for SWIG

proposed by Joe Orton in http://svn.haxx.se/dev/archive-2015-07/0028.shtml.

* build/ac-macros/swig.m4,

subversion/bindings/swig/INSTALL:

Change version check and documentation to allow SWIG >= 3.0.6

* subversion/bindings/swig/include/proxy.swg:

Use %{ %} with %pythoncode so comments avoid the SWIG processor,

fixing the bindings with SWIG >= 3.0.6.

  1. … 2 more files in changeset.
Followup to r1700844: fix the build.

* build/ac-macros/swig.m4

(SVN_CHECK_SWIG, SVN_FIND_SWIG):

Only require swig when --with-swig was passed.

swig: Error out if --with-swig was passed but swig not found.

* build/ac-macros/swig.m4

(SVN_FIND_SWIG): As above.

Also, change the magic string used by SVN_CHECK_SWIG/SVN_FIND_SWIG to

communicate the "--with-swig passed without value" case.

* build/ac-macros/swig.m4

(SVN_FIND_SWIG): In a comment, remove a mention of obsolete files.

* build/ac-macros/swig.m4:

(SVN_FIND_SWIG): Update version warning on SWIG to complain about 3.0.0 and

newer.

Revert r1659397; it breaks too many buildbots.

* TODO: Re-added.

* build/ac-macros/swig.m4: Reverted.

  1. … 1 more file in changeset.
[Reverted in r1659546]

Do not attempt to build bindings with Swig 3.0+. Current versions

break the Python bindings.

* build/ac-macros/swig.m4

(SVN_FIND_SWIG): Add an upper limite to supported Swig versions.

Do not configure bindings if the detected Swig is not suitable.

* TODO: Remove.

  1. … 1 more file in changeset.
Allow Swig to use Ruby 2.0 and 2.1.

Patch by: James McCoy <jamessan{_AT_}debian.org>

* build/ac-macros/swig.m4

(SVN_FIND_SWIG): Adjust include path for Ruby 2.

* configure.ac: Allow Ruby 2.0 and 2.1.

  1. … 1 more file in changeset.
Reintegrate tweak-build-take-two branch to trunk.

Summary of changes:

** Split standards-compliance mode and maintainer mode compiler flags

out of CFLAGS, so that compilation command lines that do not

generate (too many) warnings or are not forced to comply with ISO

C '90 can be constructed without having to resort to stripping

individual flags out of CFLAGS.

$ svn diff -r1424288:1424822 \

^/subversion/branches/tweak-build-take-two/configure.ac \

^/subversion/branches/tweak-build-take-two/aclocal.m4 \

^/subversion/branches/tweak-build-take-two/build/ac-macros/compiler.m4 \

^/subversion/branches/tweak-build-take-two/Makefile.in

** Now that warning and standards-compliance mode macros are no

longer part of CFLAGS, stop stripping them in the Swig wrapper

configury, except for Ruby, which is more delicate.

$ svn diff -r1424329:1425040 \

^/subversion/branches/tweak-build-take-two/build/ac-macros/swig.m4

** Allow optimization and debugging to coexist, including in

maintainer mode, adding a new configure option

--enable-optimize. Neither --enable-optimize nor --enable-debug

will override any optimization or debugging flags set by the user

in C(XX)FLAGS at configure time. If debugging and optimization are

enabled at the same time, we will try to use -O1, then -O; if

debuggin is not enabled, we will try -O2 first.

$ svn diff -c1424860 \

^/subversion/branches/tweak-build-take-two/configure.ac

** Remove an obsolete autoconf macro that was not used anywhere and

is superceded with SVN_CFLAGS_ADD_IFELSE.

$ svn diff -c1424297 \

^/subversion/branches/tweak-build-take-two/build/ac-macros/svn-macros.m4

** Move the sqlite-amalgamation directory from the root of the source tree

under subversion/include/private to make include paths safer from

possible collision with sqlite include files from other install locations.

$ svn diff -c1425050 \

^/subversion/branches/tweak-build-take-two

** Allow a user to set a custom set of compiler flags at configure time that

are used for Subversion sources, but not, e.g., Swig-generated sources,

like this:

$ ./configure CUSERFLAGS=--flags-for-C CXXUSERFLAGS=--flags-for-C++

$ svn diff -c1425086 \

^/subversion/branches/tweak-build-take-two

  1. … 14 more files in changeset.
Similar to r1421645, but for the Python bindings: filter out noisy warnings.

* build/ac-macros/swig.m4

(SVN_FIND_SWIG): Filter some noise from the output of 'make swig-py'.

Make the warnings issued when building the Ruby bindings *much* less verbose.

The removed warnings are the result of swig's---ahem---interesting way of

generating code. Hopefully, this helps us find more errors, more quickly.

* build/ac-macros/swig.m4

(SVN_FIND_SWIG): Filter out a number of compiler warnings flags for the Ruby

bindings.

The swig python bindings generate a lot of shadowed variables, which then

emit a number of warnings when compiling. Turn off those warnings for swig-py.

* build/ac-macros/swig.m4:

Filter -Wshadow from SWIG_PY_COMPILE.

fix Ruby 1.9 deprecation warning for Config, use RbConfig

* configure.ac

replace Config with RbConfig

* build/ac-macros/swig.m4

replace Config with RbConfig

Approved by: gstein

  1. … 1 more file in changeset.
* build/ac-macros/swig.m4

(SVN_FIND_SWIG): Strip -std=c89 from CFLAGS in a second place, just

like -ansi.

* build/ac-macros/swig.m4: When checking how to link ruby libraries,

include all libraries that libruby depends on in the linker argument

list, rather than just the ruby library itself. Should fix the build on

OpenBSD with ruby-1.9. The configure script could not detect rb_errinfo()

because linking ruby libraries failed as the -pthread argument was missing.

This argument isn't part of the LIBRUBYARG value in rbconfig, but of LIBS.

Remove check for maximal version of SWIG.

* build/ac-macros/swig.m4

(SVN_FIND_SWIG): Remove check for maximal version of SWIG.

* subversion/bindings/swig/INSTALL: Update documentation.

  1. … 1 more file in changeset.
Support SWIG 2.0.2.

* build/ac-macros/swig.m4

(SVN_FIND_SWIG):

* subversion/bindings/swig/INSTALL: Support SWIG 2.0.2.

  1. … 1 more file in changeset.
[ This was reverted/redone as part of issue #3850, which see. ]

Don't error on 'none: bad command or file name' when SWIG was disabled

at configure-time.

(Yes, I'm on Debian, thanks for asking.)

* Makefile.in

(check-SWIG): New target.

(swig-py, swig-pl, swig-rb): Use new target to fail early.

* build/generator/gen_make.py

(Generator.write): Use the new target in build-outputs.mk, too.

* build/ac-macros/swig.m4

(SVN_FIND_SWIG): Don't check for 'none', just set the thing to 'none'.

As a side effect, the message to stdout is obliterated.

  1. … 2 more files in changeset.
Fix comparisons of SWIG version in build system. Previously

generator.swig.Generator.version() was returning 20001 for SWIG 2.0.1, which

was incorrectly compared with hardcoded integers corresponding to SWIG 1.3.2*

(e.g. 103024 for SWIG 1.3.24).

This change also fixes building of Ruby bindings with SWIG 2.0.0 and 2.0.1.

* build/generator/swig/__init__.py

(Generator.version): Return a tuple of integers instead of

a single integer.

* build/generator/swig/checkout_swig_header.py

(Generator.checkout, Generator._skip_checkout):

* build/generator/swig/external_runtime.py

(Generator.write_external_runtime): Compare tuples returned by

generator.swig.Generator.version() with tuples of integers.

* build/ac-macros/swig.m4

(SVN_FIND_SWIG):

* subversion/bindings/swig/INSTALL: Declare SWIG 2.0.1 supported.

  1. … 4 more files in changeset.
Fix warnings about missing AC_LANG_SOURCE with autoconf 2.68; tested also

against 2.59.

Kudos to Philip Martin for pointing me at final bit needed to fix this.

* build/ac-macros/kwallet.m4 (SVN_LIB_KWALLET),

build/ac-macros/swig.m4 (SVN_FIND_SWIG),

build/ac-macros/gssapi.m4 (SVN_LIB_RA_SERF_GSSAPI),

build/ac-macros/neon.m4 (SVN_NEON_CONFIG),

configure.ac:

Wrap AC_{PREPROC,COMPILE,LINK}_IFELSE source argument with AC_LANG_SOURCE.

  1. … 4 more files in changeset.