| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Eliminate unneeded imports, and a few unneeded statements -
usually "pass" where it is not syntactically needed.
A couple of import try blocks were eliminated or changed
when they're "cannot happen" due to current floor Python version.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A couple of minor reformats along the way, most prominently, in tests,
if being edited anyway, make sure the docstring most tests have is
actually the docstring (sometimes the __revision__ line came before,
which makes the string not be the docstring).
Snuck in some minor framework changes that were orphaned when another
draft PR was not needed: this almost all docstring changes, the
functional part is using casefold instead of lower in a match func -
a slightly better approach which is now possible that Py2 compatibility
is not needed.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Three files in the previous fix got an added call to pull
in the wrapper.py fixture; it turns out they didn't actually
use it - appeared in a dummy call to Clone but the cloned
env was never used. Drop those bits.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In a few places, a command line was built to execute a wrapper
script written in Python, but the Python used was not the one used
to invoke the test run (which is made available by TestSCons), but
the result of running test.where_is('python'). On a system which
still has the thing named 'python' resolve to Python 2, this fails,
through no fault of scons itself.
The two fixture wrapper scripts used occasionally by the tests
used subprocess.call; this is considered "old" though not marked
as deprecated at this time. Switched to subprocess.run. See:
https://docs.python.org/3/library/subprocess.html#older-high-level-api
One of these scripts was doing unnecessary bytes-twiddling.
Modernized the inline myswig.py script (in test/SWIG/SWIG.py).
This script was reformatted using Black along the way.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Drop unneeded parens.
Drop trailing semicolons.
Triple double-quote docstrings.
Regexes drop unneeded escapes.
Spaces around parens, braces: remove/add.
Some one-tuples get their missing closing comma.
A couple of sets use set init syntax {foo} instead of set([iter]) now.
And a fiddle in Node to reduce lookup time on md5 signature functions
(came about because of a line-too-long issue, initially)
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"for i in range(len(foo))" idiom changed to iterate directly over lists
instead of indexing them. zip() generates the iterator in the case with
two lists. reversed() used for the Windows drive-letter test.
gdbm is not gone, just renamed. change test to find under either name.
Use a context manager for closing StringIO objects opened for capturing
standard I/O streams.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
| |
against string with native os.linesep
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Two tests were missing the raw-string marker when defining
the Python include path.
TestSCons:get_platform_python_info needed some rework for Windows,
it was failing to find the python library if running in a virtual
environment. Also removed a try-block; sys.version_info is standard
since Python 2.0 and so does not need wrapping.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
| |
evolved the get_platform_python_info test method to fail only
if a new flag python_h_required is True. Rolled back the
previous change to have the method return the path to the
Python.h, this was not really needed since the include
path is already returned.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
|
|
|
| |
A previous change added a check for Python.h in one SWIG test which did
not have it which turns that test into a skip instead of a fail if the
header is not installed. It was pointed out that having 12 tests check
for the same thing might be optimised by putting the check in the routine
which returns info about the python development environment, so this
change makes that modification.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
|
|
|
|
|
|
|
| |
The generated code will #include <Python.h>, so skip the test if the
appropriate development support for Python is not installed, the test
will FAIL otherwise. The other SWIG tests do this already.
Signed-off-by: Mats Wichmann <mats@linux.com>
|
| |
|
|
|
|
| |
paths,and library names. Use sysconfig.get_config_var() calls instead
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
on windows.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|\ |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
| |
The tool detection is improved by checking for swig in
env['SWIG'], where it is commonly set, as well as env['ENV']['PATH'].
The tests mostly didn't work on Windows. I updated them all.
Mostly to build 32-bit extensions when using 32-bit python on
Windows, and use .pyd as the python extension on Windows.
|
| |
|
| |
|
|
|
|
| |
module name in %module directive
|
|
|
|
|
|
|
| |
Comb out all code that supported earlier versions of Python. Most such
code is in snippets of only a few lines and can be identified by having
a Python version string in it. Such snippets add up; this combing pass
probably got rid of over 500 lines of code.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 'buffer' fixer simply replaces 'buffer( ... )' with 'memoryview( ... )',
which is incorrect for our cases, so these changes had to be done by hand and
a forward-compatibility class added.
The 'xrange' fixer was applied. Manual changes were minimal: a few case in
test strings and one use of 'range' as an identifer in the same scope as
where 'xrange' was converted to 'range'.
The "sets15" compat function, which provided backward compatibility for Python
versions prior to 2.2, was removed as no longer needed.
|
|
|
|
|
| |
development. Note that this set of changes is NOT backward-compatible;
the trunk no longer works with Python 1.5.2, 2.0, or 2.1.
|
|
|
|
| |
Use test.wrap_stdout() instead of hard-coding the SCons messages.
|
|
|
|
| |
Make an educated guess on the generated module name based on the .i file name.
|
| |
|
|
|
|
|
|
| |
really is). OS X now not only runs all the SWIG tests (it used to skip many
of them because it could not find the appropriate files), it now passes all
the tests.
|