mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Ports: Fix python3 package so linting script doesn't error out.
I have my environment configured to use https://pre-commit.com/. I guess the scripts were changed recently to lint all ports, and the python port was barfing on my system because of this bug.
This commit is contained in:
parent
4c26e318a3
commit
0398e4a48a
Notes:
sideshowbarker
2024-07-18 19:08:54 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/0398e4a48a7 Pull-request: https://github.com/SerenityOS/serenity/pull/6621
1 changed files with 11 additions and 8 deletions
|
@ -30,15 +30,18 @@ post_configure() {
|
|||
run cp "${SERENITY_SOURCE_DIR}/Ports/${port}/Setup.local" "Modules/Setup.local"
|
||||
}
|
||||
|
||||
if [ -x "$(command -v python3)" ]; then
|
||||
# Check if major and minor version of python3 are matching
|
||||
if ! python3 -c "import sys; major, minor, _ = map(int, '${PYTHON_VERSION}'.split('.')); sys.exit(not (sys.version_info.major == major and sys.version_info.minor == minor))"; then
|
||||
echo "Error: python3 version does not match needed version to build ${PYTHON_VERSION}" >&2
|
||||
# Note: The showproperty command is used when linting ports, we don't actually need python at this time.
|
||||
if [ "$1" != "showproperty" ]; then
|
||||
if [ -x "$(command -v python3)" ]; then
|
||||
# Check if major and minor version of python3 are matching
|
||||
if ! python3 -c "import sys; major, minor, _ = map(int, '${PYTHON_VERSION}'.split('.')); sys.exit(not (sys.version_info.major == major and sys.version_info.minor == minor))"; then
|
||||
echo "Error: python3 version does not match needed version to build ${PYTHON_VERSION}" >&2
|
||||
echo "Build this Python version on your host using Toolchain/BuildPython.sh or install it otherwise and try again." >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Error: python3 is not installed but is required to build ${PYTHON_VERSION}" >&2
|
||||
echo "Build this Python version on your host using Toolchain/BuildPython.sh or install it otherwise and try again." >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "Error: python3 is not installed but is required to build ${PYTHON_VERSION}" >&2
|
||||
echo "Build this Python version on your host using Toolchain/BuildPython.sh or install it otherwise and try again." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue