diff options
author | William Deegan <bill@baddogconsulting.com> | 2021-10-04 02:06:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-04 02:06:15 (GMT) |
commit | 5cea0246d3c2097635a2a3a873a6cbf509f5cc43 (patch) | |
tree | 6736c8414977eef9708bc7ad8f4b4561543028de /SCons/Scanner/Python.py | |
parent | 69734f501ba021d6b3bf00d9c5b4559e60a0f2fd (diff) | |
parent | 0e0168bbe17980360ca3edec9a043a3969438aa7 (diff) | |
download | SCons-5cea0246d3c2097635a2a3a873a6cbf509f5cc43.zip SCons-5cea0246d3c2097635a2a3a873a6cbf509f5cc43.tar.gz SCons-5cea0246d3c2097635a2a3a873a6cbf509f5cc43.tar.bz2 |
Merge pull request #3963 from mwichmann/scanner-tweaks
Scanner tweaks
Diffstat (limited to 'SCons/Scanner/Python.py')
-rw-r--r-- | SCons/Scanner/Python.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/SCons/Scanner/Python.py b/SCons/Scanner/Python.py index 86aa001..ba2fd5a 100644 --- a/SCons/Scanner/Python.py +++ b/SCons/Scanner/Python.py @@ -35,7 +35,10 @@ those directories in PYTHONPATH. import itertools import os import re -import SCons.Scanner + +import SCons.Node.FS +import SCons.Util +from . import Base # Capture python "from a import b" and "import a" statements. from_cre = re.compile(r'^\s*from\s+([^\s]+)\s+import\s+(.*)', re.M) @@ -198,9 +201,13 @@ def scan(node, env, path=()): PythonSuffixes = ['.py'] -PythonScanner = SCons.Scanner.Base(scan, name='PythonScanner', - skeys=PythonSuffixes, - path_function=path_function, recursive=1) +PythonScanner = Base( + scan, + name='PythonScanner', + skeys=PythonSuffixes, + path_function=path_function, + recursive=True, +) # Local Variables: # tab-width:4 |