mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
sbom: New SBOM_PYTHON_INTERP_PATH env to use correct python3 for SBOM
To all linux, macOS and Windows platforms. Task-number: QTQAINFRA-7554 Change-Id: I677440fb9faf3f3d36744b59f91f0036449b639b Reviewed-by: Jukka Jokiniva <jukka.jokiniva@qt.io>
This commit is contained in:
@@ -30,6 +30,9 @@ SetEnvVar "PYTHON3_PATH" "/Library/Frameworks/Python.framework/Versions/3.11/bin
|
||||
SetEnvVar "PIP3_PATH" "/Library/Frameworks/Python.framework/Versions/3.11/bin"
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/Library/Frameworks/Python.framework/Versions/3.11/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/Library/Frameworks/Python.framework/Versions/3.11/bin/python3"
|
||||
|
||||
# Install Python certificates. Required at least for emsdk installation
|
||||
open /Applications/Python\ 3.11/Install\ Certificates.command
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ if ([version]::Parse($version) -gt [version]::Parse("3.10")) {
|
||||
# Set the environment variable for the build system to know which python path to use for SBOM
|
||||
# processing.
|
||||
Set-EnvironmentVariable "SBOM_PYTHON_APPS_PATH" "$install_path\Scripts"
|
||||
Set-EnvironmentVariable "SBOM_PYTHON_INTERP_PATH" "$install_path\python.exe"
|
||||
}
|
||||
|
||||
# Install PyPDF2 for QSR documentation
|
||||
|
||||
@@ -269,6 +269,9 @@ source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/home/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/local/bin/python3"
|
||||
|
||||
# SetEnvVar "PATH" "/usr/lib/nodejs-mozilla/bin:\$PATH"
|
||||
|
||||
#OpenSSLVersion="$(openssl version |cut -b 9-14)"
|
||||
|
||||
@@ -172,12 +172,19 @@ sudo pip config --user set global.extra-index-url https://pypi.org/simple/
|
||||
sudo pip3 install virtualenv wheel
|
||||
sudo python3.11 -m pip install virtualenv wheel html5lib
|
||||
sudo python3.11 -m pip install -r "${BASH_SOURCE%/*}/../common/shared/requirements.txt"
|
||||
# For now we don't set QT_SBOM_PYTHON_APPS_PATH here, and rely on the build system to find the
|
||||
# system python3.11.
|
||||
|
||||
sudo /usr/bin/pip3 install wheel
|
||||
sudo /usr/bin/pip3 install dataclasses
|
||||
|
||||
# Provisioning during installation says:
|
||||
# 'The script sbom2doc is installed in '/usr/local/bin' which is not on PATH.'
|
||||
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/usr/local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/bin/python3.11"
|
||||
|
||||
gccVersion="$(gcc --version |grep -Eo '[0-9]+\.[0-9]+(\.[0-9]+)?' |head -n 1)"
|
||||
echo "GCC = $gccVersion" >> versions.txt
|
||||
|
||||
|
||||
@@ -196,6 +196,9 @@ sudo /usr/bin/pip3 install -r "${BASH_SOURCE%/*}/../common/shared/requirements.t
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/usr/local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/bin/python3"
|
||||
|
||||
# Make FindPython3.cmake to find python3
|
||||
sudo ln -s /usr/bin/python3 /usr/local/bin/python3
|
||||
|
||||
|
||||
@@ -199,6 +199,9 @@ sudo /usr/bin/pip3 install -r "${BASH_SOURCE%/*}/../common/shared/requirements.t
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/usr/local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/bin/python3"
|
||||
|
||||
# Make FindPython3.cmake to find python3
|
||||
sudo ln -s /usr/bin/python3 /usr/local/bin/python3
|
||||
|
||||
|
||||
@@ -200,6 +200,9 @@ sudo /usr/bin/pip3 install -r "${BASH_SOURCE%/*}/../common/shared/requirements.t
|
||||
source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/usr/local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/bin/python3"
|
||||
|
||||
# Make FindPython3.cmake to find python3
|
||||
sudo ln -s /usr/bin/python3 /usr/local/bin/python3
|
||||
|
||||
|
||||
@@ -81,3 +81,6 @@ SetEnvVar "PYTHON3_PATH" "/usr/local/bin"
|
||||
# 'The script sbom2doc is installed in '/home/qt/.local/bin' which is not on PATH.'
|
||||
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/home/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/local/bin/python3"
|
||||
|
||||
@@ -81,3 +81,6 @@ SetEnvVar "PYTHON3_PATH" "/usr/local/bin"
|
||||
# 'The script sbom2doc is installed in '/home/qt/.local/bin' which is not on PATH.'
|
||||
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/home/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/local/bin/python3.12"
|
||||
|
||||
@@ -262,6 +262,9 @@ source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/home/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/bin/python3"
|
||||
|
||||
gccVersion="$(gcc --version |grep -Eo '[0-9]+\.[0-9]+(\.[0-9]+)?' |head -n 1)"
|
||||
echo "GCC = $gccVersion" >> versions.txt
|
||||
|
||||
|
||||
@@ -258,6 +258,9 @@ source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/home/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/bin/python3"
|
||||
|
||||
gccVersion="$(gcc --version |grep -Eo '[0-9]+\.[0-9]+(\.[0-9]+)?' |head -n 1)"
|
||||
echo "GCC = $gccVersion" >> versions.txt
|
||||
|
||||
|
||||
@@ -270,6 +270,9 @@ source "${BASH_SOURCE%/*}/../common/unix/SetEnvVar.sh"
|
||||
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/home/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/bin/python3"
|
||||
|
||||
gccVersion="$(gcc --version |grep -Eo '[0-9]+\.[0-9]+(\.[0-9]+)?' |head -n 1)"
|
||||
echo "GCC = $gccVersion" >> versions.txt
|
||||
|
||||
|
||||
@@ -22,3 +22,6 @@ SetEnvVar "PYTHON3_EXECUTABLE" "/usr/bin/python3.11"
|
||||
# 'Defaulting to user installation because normal site-packages is not writeable'
|
||||
# So it implicitly uses pip install --user, hence the path.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/home/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/bin/python3.11"
|
||||
|
||||
@@ -22,3 +22,6 @@ SetEnvVar "PYTHON3_EXECUTABLE" "/usr/bin/python3.11"
|
||||
# 'Defaulting to user installation because normal site-packages is not writeable'
|
||||
# So it implicitly uses pip install --user, hence the path.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/home/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/bin/python3.11"
|
||||
|
||||
@@ -20,3 +20,6 @@ SetEnvVar "PYTHON3_EXECUTABLE" "/usr/bin/python3.13"
|
||||
# 'Defaulting to user installation because normal site-packages is not writeable'
|
||||
# So it implicitly uses pip install --user, hence the path.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/home/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/usr/bin/python3.13"
|
||||
|
||||
@@ -23,4 +23,7 @@ SetEnvVar "PATH" "\$PYTHON3_PATH:\$PATH"
|
||||
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/Users/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/Users/qt/.pyenv/versions/3.9.7/bin/python3"
|
||||
|
||||
echo "python3 = 3.9.7" >> ~/versions.txt
|
||||
|
||||
@@ -23,4 +23,7 @@ SetEnvVar "PATH" "\$PYTHON3_PATH:\$PATH"
|
||||
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/Users/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/Users/qt/.pyenv/versions/3.9.7/bin/python3"
|
||||
|
||||
echo "python3 = 3.9.7" >> ~/versions.txt
|
||||
|
||||
@@ -23,4 +23,7 @@ SetEnvVar "PATH" "\$PYTHON3_PATH:\$PATH"
|
||||
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/Users/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/Users/qt/.pyenv/versions/3.9.7/bin/python3"
|
||||
|
||||
echo "python3 = 3.9.7" >> ~/versions.txt
|
||||
|
||||
@@ -23,4 +23,7 @@ SetEnvVar "PATH" "\$PYTHON3_PATH:\$PATH"
|
||||
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/Users/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/Users/qt/.pyenv/versions/3.12.11/bin/python3"
|
||||
|
||||
echo "python3 = 3.12.11" >> ~/versions.txt
|
||||
|
||||
@@ -23,4 +23,7 @@ SetEnvVar "PATH" "\$PYTHON3_PATH:\$PATH"
|
||||
# hence the explicit assignment to SBOM_PYTHON_APPS_PATH.
|
||||
SetEnvVar "SBOM_PYTHON_APPS_PATH" "/Users/qt/.local/bin"
|
||||
|
||||
# Set SBOM_PYTHON_INTERP_PATH to Python3 instance which was used to install SBOM packages from requirements
|
||||
SetEnvVar "SBOM_PYTHON_INTERP_PATH" "/Users/qt/.pyenv/versions/3.9.7/bin/python3"
|
||||
|
||||
echo "python3 = 3.9.7" >> ~/versions.txt
|
||||
|
||||
Reference in New Issue
Block a user