summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-04-15 12:10:26 -0600
committerTom Rini <[email protected]>2025-04-24 15:37:27 -0600
commitefd00b03455644b18eaf2b6dcd07f6d55b95b39e (patch)
tree037d898da2753ccf92134099cc643e51b7b3d38d /.gitlab-ci.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 <[email protected]>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml10
1 files changed, 5 insertions, 5 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 145bdad83bf..e94b23df9f8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -57,7 +57,7 @@ stages:
export BINMAN_INDIRS=/tmp;
fi
# Prepare python environment
- - 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
-r tools/buildman/requirements.txt -r tools/u_boot_pylib/requirements.txt
@@ -124,7 +124,7 @@ build all platforms in a single job:
- ${HOST}
script:
# Prepare python environment
- - 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
@@ -155,7 +155,7 @@ check for new CONFIG symbols outside Kconfig:
docs:
extends: .testsuites
script:
- - 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
@@ -184,7 +184,7 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
git config --global user.email [email protected];
git config --global --add safe.directory "${CI_PROJECT_DIR}";
export USER=gitlab;
- 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
-r tools/buildman/requirements.txt -r tools/patman/requirements.txt
@@ -210,7 +210,7 @@ Run pylint:
extends: .testsuites
script:
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
- - 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
-r tools/buildman/requirements.txt -r tools/patman/requirements.txt