python: Use and refer to the venv module rather than virtualenv
Using some form of sandbox with Python modules is a long standing best
practice with the language. There are a number of ways to have a Python
sandbox be created. At this point in time, it seems the Python community
is moving towards using the "venv" module provided with Python rather
than a separate tool. To match that we make the following changes:
- Refer to a "Python sandbox" rather than virtualenv in comments, etc.
- Install the python3-venv module in our container and not virtualenv.
- In our CI files, invoke "python -m venv" rather than "virtualenv".
- In documentation, tell users to install python3-venv and not
virtualenv.
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/tools/buildman/test.py b/tools/buildman/test.py
index c5feb74..e31e6c7 100644
--- a/tools/buildman/test.py
+++ b/tools/buildman/test.py
@@ -987,7 +987,7 @@
diff = self.call_make_environment(tchn, full_path=True)[0]
self.assertEqual({b'LC_ALL': b'C'}, diff)
- # Test that virtualenv is handled correctly
+ # Test that Python sandbox is handled correctly
tchn.override_toolchain = False
sys.prefix = '/some/venv'
env = dict(os.environb)
diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py
index f4c832b..5e5bb4b 100644
--- a/tools/buildman/toolchain.py
+++ b/tools/buildman/toolchain.py
@@ -217,7 +217,7 @@
elif self.cross:
env[b'CROSS_COMPILE'] = tools.to_bytes(wrapper + self.cross)
- # Detect a Python virtualenv and avoid defeating it
+ # Detect a Python sandbox and avoid defeating it
if sys.prefix != sys.base_prefix:
paths = env[b'PATH'].split(b':')
new_paths = []