Skip to content

Commit 858f435

Browse files
author
Bernd Gassmann
committed
python environment activation by script
1 parent 8903fea commit 858f435

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# ----------------- BEGIN LICENSE BLOCK ---------------------------------
4+
#
5+
# Copyright (c) 2025 Intel Corporation
6+
#
7+
# ----------------- END LICENSE BLOCK -----------------------------------
8+
##
9+
10+
# use virtual environment for our build dependencies
11+
if [ ! -f build/map-build-venv/bin/activate ]; then
12+
python${PYTHON_BINDING_VERSION} -m venv build/map-build-venv
13+
fi
14+
source build/map-build-venv/bin/activate

.github/workflows/build_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,5 @@ jobs:
6969
run: |
7070
sudo apt-get install ${EXTRA_PACKAGES}
7171
rm -rf log build install
72+
source .github/workflows/activate_python_environment.sh
7273
eval CC=${CC} CXX=${CXX} ${BUILDCMD}

.github/workflows/install_dependencies.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,13 @@ sudo apt-get install -y --no-install-recommends build-essential castxml cmake sq
3333

3434

3535
sudo apt-get install -y --no-install-recommends python${PYTHON_BINDING_VERSION}-dev libpython${PYTHON_BINDING_VERSION}-dev
36-
curl -sS https://bootstrap.pypa.io/get-pip.py | sudo python${PYTHON_BINDING_VERSION}
3736

3837
if [[ "${BUILD_DOCU}x" != "x" ]]; then
3938
sudo apt-get install doxygen graphviz lcov
4039
fi
4140

4241
sudo apt remove python3-pygments
4342

44-
# use virtual environment for our build dependencies
45-
python${PYTHON_BINDING_VERSION} -m venv build/map-build-venv
46-
source build/map-build-venv/bin/activate
43+
source activate_python_environment.sh
44+
curl -sS https://bootstrap.pypa.io/get-pip.py | python${PYTHON_BINDING_VERSION}
4745
python${PYTHON_BINDING_VERSION} -m pip install -r .github/workflows/requirements.txt

0 commit comments

Comments
 (0)