]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts/build_utils.sh: use "python3 -m venv" to create venv 1910/head
authorKefu Chai <kchai@redhat.com>
Wed, 22 Sep 2021 13:27:05 +0000 (21:27 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 22 Sep 2021 13:27:06 +0000 (21:27 +0800)
we started to have following error recently:

```
+ local path=/tmp/venv.0D0Gwn9bMl
+ '[' -d /tmp/venv.0D0Gwn9bMl ']'
+ command -v python3
+ virtualenv -p python3 /tmp/venv.0D0Gwn9bMl
/tmp/jenkins5609477504730019125.sh: line 106: virtualenv: command not found
```

instead of relying on `virtualenv`, let's use the builtin venv
module to create virtualenv.

Signed-off-by: Kefu Chai <kchai@redhat.com>
scripts/build_utils.sh

index f2c3dd9ff1810bf9c6121acea1512ea466dfada0..364edabd3ca120247598d52eb0b968e246663271 100644 (file)
@@ -103,7 +103,7 @@ create_virtualenv () {
         echo "Will reuse existing virtual env: $path"
     else
         if command -v python3 > /dev/null; then
-            virtualenv -p python3 $path
+            python3 -m venv $path
         elif command -v python2.7 > /dev/null; then
             virtualenv -p python2.7 $path
         else