summaryrefslogtreecommitdiff
path: root/SCons/Platform/virtualenv.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2023-05-03 20:41:15 -0700
committerGitHub <noreply@github.com>2023-05-03 20:41:15 -0700
commit4997bbda807ebdbcd11b1282981c3abb81dd8ee1 (patch)
tree6199e98610c76c39efe59a4dc6e91d31e5a13e96 /SCons/Platform/virtualenv.py
parent4c835c49219361b08f03b71d1f944e2e74f23545 (diff)
parent84859d565216af998f817e05d0696f3423bb7216 (diff)
downloadscons-git-4997bbda807ebdbcd11b1282981c3abb81dd8ee1.tar.gz
Merge branch 'master' into bug/msys-python
Diffstat (limited to 'SCons/Platform/virtualenv.py')
-rw-r--r--SCons/Platform/virtualenv.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/SCons/Platform/virtualenv.py b/SCons/Platform/virtualenv.py
index 2204a595b..df7ad574d 100644
--- a/SCons/Platform/virtualenv.py
+++ b/SCons/Platform/virtualenv.py
@@ -51,7 +51,7 @@ def _running_in_virtualenv():
(hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix))
-def _is_path_in(path, base):
+def _is_path_in(path, base) -> bool:
"""Returns true if **path** is located under the **base** directory."""
if not path or not base: # empty path may happen, base too
return False
@@ -59,7 +59,7 @@ def _is_path_in(path, base):
return (not rp.startswith(os.path.pardir)) and (not rp == os.path.curdir)
-def _inject_venv_variables(env):
+def _inject_venv_variables(env) -> None:
if 'ENV' not in env:
env['ENV'] = {}
ENV = env['ENV']
@@ -69,7 +69,7 @@ def _inject_venv_variables(env):
except KeyError:
pass
-def _inject_venv_path(env, path_list=None):
+def _inject_venv_path(env, path_list=None) -> None:
"""Modify environment such that SCons will take into account its virtualenv
when running external tools."""
if path_list is None:
@@ -86,7 +86,7 @@ def select_paths_in_venv(path_list):
return [path for path in path_list if IsInVirtualenv(path)]
-def ImportVirtualenv(env):
+def ImportVirtualenv(env) -> None:
"""Copies virtualenv-related environment variables from OS environment
to ``env['ENV']`` and prepends virtualenv's PATH to ``env['ENV']['PATH']``.
"""