diff options
author | Mats Wichmann <mats@linux.com> | 2020-07-11 08:06:16 -0600 |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2020-09-23 12:31:48 -0600 |
commit | d0a3e4ed38f4a4cd84000dec2342f51b6dda69b9 (patch) | |
tree | 69968f37fe9a8d41ff23205f66468003956dfff2 /SCons/Scanner/Python.py | |
parent | ea642040eca864aaeac25da013cce9fd875489f0 (diff) | |
download | scons-git-d0a3e4ed38f4a4cd84000dec2342f51b6dda69b9.tar.gz |
Update some copyright strings and drop __revision__ [skip appveyor]
Touches the first and second levels of SCons (except SCons.Tool),
not tests or docs which remain TODO.
Make sure docstring is first non-comment content, eliminate cases where
docstring is set elsewhere but assigns to __doc__ - this approach of
course worked inside Python, but confuses various tools.
Some module-level docstrings modified a bit, in particular
the convention of having the name of the module as the first line
is dropped, replaced by a summary description going there instead -
this improves the look in the API Docs, which otherwise display
something like:
SCons.Foo - SCons.Foo
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Scanner/Python.py')
-rw-r--r-- | SCons/Scanner/Python.py | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/SCons/Scanner/Python.py b/SCons/Scanner/Python.py index deb2241e1..dc6812c54 100644 --- a/SCons/Scanner/Python.py +++ b/SCons/Scanner/Python.py @@ -1,18 +1,6 @@ -"""SCons.Scanner.Python - -This module implements the dependency scanner for Python code. - -One important note about the design is that this does not take any dependencies -upon packages or binaries in the Python installation unless they are listed in -PYTHONPATH. To do otherwise would have required code to determine where the -Python installation is, which is outside of the scope of a scanner like this. -If consumers want to pick up dependencies upon these packages, they must put -those directories in PYTHONPATH. - -""" - +# MIT License # -# __COPYRIGHT__ +# Copyright The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,9 +20,17 @@ those directories in PYTHONPATH. # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" +"""Dependency scanner for Python code. + +One important note about the design is that this does not take any dependencies +upon packages or binaries in the Python installation unless they are listed in +PYTHONPATH. To do otherwise would have required code to determine where the +Python installation is, which is outside of the scope of a scanner like this. +If consumers want to pick up dependencies upon these packages, they must put +those directories in PYTHONPATH. + +""" import itertools import os @@ -55,8 +51,7 @@ def path_function(env, dir=None, target=None, source=None, argument=None): def find_include_names(node): - """ - Scans the node for all imports. + """Scans the node for all imports. Returns a list of tuples. Each tuple has two elements: 1. The main import (e.g. module, module.file, module.module2) |