Checkout Tools
  • last updated 6 hours 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.
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.
Use isinstance() for type comparisons.

* build/generator/util/executable.py:

* build/win32/make_dist.py:

* gen-make.py:

* subversion/tests/cmdline/svnadmin_tests.py:

* subversion/tests/cmdline/svndumpfilter_tests.py:

* tools/bdb/skel.py:

* www/toctool.py: Use isinstance() for type comparisons.

  1. … 6 more files in changeset.
Use some types directly instead of using type().

* build/generator/util/executable.py:

* build/win32/make_dist.py:

* gen-make.py:

* subversion/tests/cmdline/merge_tests.py:

* subversion/tests/cmdline/svnadmin_tests.py:

* subversion/tests/cmdline/svndumpfilter_tests.py:

* subversion/tests/cmdline/svntest/actions.py:

* subversion/tests/cmdline/svntest/verify.py: Use some types directly instead

of using type().

  1. … 7 more files in changeset.
Delete code used only by Python <2.4.

* build/generator/util/executable.py:

* subversion/bindings/swig/python/svn/fs.py:

* subversion/tests/cmdline/svntest/main.py:

* subversion/tests/cmdline/update_tests.py:

* tools/backup/hot-backup.py.in:

* tools/hook-scripts/mailer/mailer.py:

* tools/hook-scripts/verify-po.py: Delete code used only by Python <2.4.

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

Use str.strip(), str.lstrip() and str.rstrip() instead of string.strip(),

string.lstrip() and string.rstrip().

* build/generator/gen_vcnet_vcproj.py:

* build/generator/gen_win.py:

* build/generator/util/executable.py:

* subversion/tests/cmdline/commit_tests.py:

* tools/backup/hot-backup.py.in:

* tools/dev/iz/find-fix.py:

* tools/dev/normalize-dump.py: Use str.strip(), str.lstrip() and str.rstrip()

instead of string.strip(), string.lstrip() and string.rstrip().

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

Use str.split() instead of string.split().

* build/generator/ezt.py:

* build/generator/gen_base.py:

* build/generator/gen_win.py:

* build/generator/swig/header_wrappers.py:

* build/generator/util/executable.py:

* tools/dev/iz/find-fix.py:

* tools/examples/svnshell.py:

* tools/hook-scripts/mailer/mailer.py:

* win-tests.py: Use str.split() instead of string.split().

  1. … 8 more files in changeset.
Follow-up to r33186 and r33191: Handle the "File not found" errors (the

command to execute is not in PATH) more safely.

* build/generator/util/executable.py

(output):

Don't catch all OSError exceptions.

Check if 'cmd' is in PATH before trying to run it.

Python 3 compatibility:

Try to use subprocess module in 'build' directory.

* build/generator/util/executable.py

(output): Try to use subprocess module.

* build/generator/util/executable.py

(output): Delete code specific to Python 1.*.

Merge python-bindings-improvements to trunk, by comparing trunkURL with

branchURL.

Major changes:

* Always build SWIG headers in the build dir, unless we are still using

pristine SWIG headers from an official Subversion release (r15865).

* Enable SWIG bindings, even if we compile --without-swig. In release builds,

we can build the bindings without SWIG (r15857).

* Refactor SWIG generator to use a modular architecture, separate from the

Unix / Windows generators (r15855).

Minor changes:

* See r15879, r15870, r15868, r15867, r15857, and r15856.

Approved by: jerenkrantz

  1. … 15 more files in changeset.