mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
Ports: Make Python version check work with suffixed versions
E.g. a1, b1, rc1. Simply don't parse anything beyond major and minor.
This commit is contained in:
parent
a613e00caa
commit
5a0a426c18
Notes:
sideshowbarker
2024-07-18 07:31:10 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/5a0a426c184 Pull-request: https://github.com/SerenityOS/serenity/pull/9190 Reviewed-by: https://github.com/gunnarbeutner
1 changed files with 1 additions and 1 deletions
|
@ -33,7 +33,7 @@ pre_configure() {
|
|||
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
|
||||
if ! python3 -c "import sys; major, minor = map(int, '${PYTHON_VERSION}'.split('.')[:2]); 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
|
||||
|
|
Loading…
Add table
Reference in a new issue