summaryrefslogtreecommitdiff
path: root/.azure-pipelines.yml
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2025-04-15 12:10:26 -0600
committerTom Rini <trini@konsulko.com>2025-04-24 15:37:27 -0600
commitefd00b03455644b18eaf2b6dcd07f6d55b95b39e (patch)
tree037d898da2753ccf92134099cc643e51b7b3d38d /.azure-pipelines.yml
parent10f48365112b164bee6564033ab682747efcb483 (diff)
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>
Diffstat (limited to '.azure-pipelines.yml')
-rw-r--r--.azure-pipelines.yml10
1 files changed, 5 insertions, 5 deletions
diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 01ab0c11f98..84032b3097d 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -90,7 +90,7 @@ stages:
steps:
- script: |
set -e
- virtualenv -p /usr/bin/python3 /tmp/venvhtml
+ python3 -m venv /tmp/venvhtml
. /tmp/venvhtml/bin/activate
pip install -r doc/sphinx/requirements.txt
make htmldocs KDOC_WERROR=1
@@ -132,7 +132,7 @@ stages:
git config --global user.email bmeng.cn@gmail.com
git config --global --add safe.directory $(work_dir)
export USER=azure
- virtualenv -p /usr/bin/python3 /tmp/venv
+ python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
pip install -r test/py/requirements.txt \
-r tools/binman/requirements.txt \
@@ -170,7 +170,7 @@ stages:
- script: |
git config --global --add safe.directory $(work_dir)
export USER=azure
- virtualenv -p /usr/bin/python3 /tmp/venv
+ python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
pip install -r test/py/requirements.txt \
-r tools/binman/requirements.txt \
@@ -277,7 +277,7 @@ stages:
if [ -n "\${BUILD_ENV}" ]; then
export \${BUILD_ENV};
fi
- virtualenv -p /usr/bin/python3 /tmp/venv
+ python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
pip install -r tools/binman/requirements.txt \
-r tools/buildman/requirements.txt \
@@ -594,7 +594,7 @@ stages:
# make environment variables available as tests are running inside a container
export BUILDMAN="${BUILDMAN}"
git config --global --add safe.directory ${WORK_DIR}
- virtualenv -p /usr/bin/python3 /tmp/venv
+ python3 -m venv /tmp/venv
. /tmp/venv/bin/activate
pip install -r tools/binman/requirements.txt \
-r tools/buildman/requirements.txt