checkout_swig_header.py

Checkout Tools
  • last updated 1 hour ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Improve external command invocation in the swig parts of the build system.

Both gen-make.py and 'make swig-py' are affected.

Developer-visible change: failure modes of the build system should be better.

* build/generator/util/executable.py: Remove.

(exists, find): Unused.

(output): Callers updated to use check_output(), which raises on non-zero

exit code. Note that no caller passed a string argument and doing so

would not have worked, since shell=True wasn't being passed to Popen().

(run): Callers updated to use subprocess.check_call() directly, which is

equivalent (with shell=True) or better (with shell=False, which is the

default).

* build/generator/swig/__init__.py

(subprocess): Import.

(_exec): Remove import.

(): All callers updated.

* build/generator/swig/checkout_swig_header.py

(subprocess): Import.

(run): Remove import.

(): All callers updated.

* build/generator/swig/external_runtime.py

(subprocess): Import.

(_exec, generator.util.executable): Remove import.

(): All callers updated.

  1. … 3 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.
Apply ASF license headers to a number of files included under that license

but lacking said header.

Patch by: Niall Pemberton <niallp{_AT_}apache.org>

  1. … 175 more files in changeset.
Python 3 compatibility:

Update calls to print() in 'build' directory, 'gen-make.py' and 'win-tests.py'.

* build/generator/extractor.py:

* build/generator/gen_win.py:

* build/generator/swig/checkout_swig_header.py:

* build/generator/swig/external_runtime.py:

* build/generator/swig/header_wrappers.py:

* build/get-py-info.py:

* build/getversion.py:

* build/run_tests.py:

* build/strip-po-charset.py:

* build/win32/make_dist.py:

* gen-make.py:

* win-tests.py: Call print() or file.write().

  1. … 11 more files in changeset.
* build/generator/swig/checkout_swig_header.py

(checkout): Remove "long long" hacks which were obsoleted by r25740.

Set native line-endings on the python script.

* build/generator/swig/checkout_swig_header.py

(svn:eol-style): Set to native.

Unbust build following bogus r25877.

* build/generator/swig/checkout_swig_header.py: Add back version as existed

prior to r25740.

Update svn_global.swg to clear the 'long long' and 'unsigned long long'

typemaps. Update SWIG build infrastructure to remove the SWIG checkout

system, which is now no longer needed.

Patch by: me

joeswatosh

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

Clear the 'long long' and 'unsigned long long' typemaps.

* build.conf

(swig-checkout-files): Remove.

* build/generator/gen_make.py

build/generator/gen_win.py:

(Generator.write): Remove logic for calling swig_checkout_files.

* build/generator/swig/__init__.py:

(Generator.__init__): Remove logic for grabbing swig_checkout_files

from build.conf.

* build/generator/swig/checkout_swig_header.py:

Remove now-unneeded file.

  1. … 5 more files in changeset.
Swig python subversion bindings build fails in VPATH builds.

* build/generator/gen_base.py

(SWIGObject.__init__):

Mark as the generated file.

* build/generator/gen_make.py

(Generator.write):

Place the generated 'C' files under 'build dir'.

* build/generator/swig/checkout_swig_header.py

(Generator.write_makefile_rules):

Place the generated '.swg' files under 'build dir'.

Approved by: dlr

  1. … 2 more files in changeset.
Import the shutil module for use in a conditional case.

Patch by: Hyrum K. Wright <hyrum_wright@byu.edu>

* build/generator/swig/checkout_swig_header.py:

Import shutil module.

Checkout SWIG libraries and build external runtimes one at a time, so as

to be more friendly to parallel make. Move functionality for checking out

SWIG libraries into checkout_swig_header.py.

* build.conf

(swig-checkout-files): New configuration value. Defines which SWIG headers

should be checked out from the SWIG library.

* build/generator/gen_make.py, build/generator/gen_win.py

(Generator.write): Checkout SWIG headers using new checkout_swig_header

module.

* build/generator/swig/__init__.py

(Generator.__init__): Read swig-checkout-files config variable.

(Generator.checkout): Remove function. Move into checkout_swig_header.py.

* build/generator/swig/external_runtime.py

(Generator.write): Rewrite function. Build external runtime for each

language.

(Generator.write_makefile_rules): Pass language into $(GEN_SWIG_RUNTIME).

Add $(SWIG_CHECKOUT_FILES) as dependency.

(Generator.write_external_runtime): Remove code for checking out SWIG

libraries. Moved to checkout_swig_header.py.

* build/generator/swig/checkout_swig_header.py: New file. Checkout files from

the SWIG library into Subversion's proxy directory.

  1. … 5 more files in changeset.