summaryrefslogtreecommitdiffstats
path: root/SCons/Scanner/Python.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2021-10-04 02:06:15 (GMT)
committerGitHub <noreply@github.com>2021-10-04 02:06:15 (GMT)
commit5cea0246d3c2097635a2a3a873a6cbf509f5cc43 (patch)
tree6736c8414977eef9708bc7ad8f4b4561543028de /SCons/Scanner/Python.py
parent69734f501ba021d6b3bf00d9c5b4559e60a0f2fd (diff)
parent0e0168bbe17980360ca3edec9a043a3969438aa7 (diff)
downloadSCons-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.py15
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