Skip to content

Commit 41f19cb

Browse files
committed
Add flag to allow access to system Python packages (esp. dbus-python) from the virtual environment.
1 parent 12b263c commit 41f19cb

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pkg/linux/build-functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ _create_python_virtualenv() {
6363
cd "usr/${APP_NAME}" || exit
6464

6565
# Create the blank venv
66-
"${SYSTEM_PYTHON_PATH}" -m venv venv
66+
"${SYSTEM_PYTHON_PATH}" -m venv --system-site-packages venv
6767
# shellcheck disable=SC1091
6868
. venv/bin/activate
6969

tools/setup-python-env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ then
77
fi
88

99
echo Creating a blank environment...
10-
python3 -m venv venv || { echo 'ERROR: Failed to create the blank virtual env.' ; exit 1; }
10+
python3 -m venv --system-site-packages venv || { echo 'ERROR: Failed to create the blank virtual env.' ; exit 1; }
1111

1212
echo Activating the virtual environment...
1313
. venv/bin/activate || { echo 'ERROR: Failed to activate the virtual env.' ; exit 1; }

0 commit comments

Comments
 (0)