Skip to content

Commit

Permalink
autotest/conftest.py: be robust to -rcX postfix on Curl version such …
Browse files Browse the repository at this point in the history
…as curl 8.13.0-rc1 of fedora:rawhide
  • Loading branch information
rouault committed Mar 11, 2025
1 parent fdfe753 commit 47d4e19
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions autotest/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,12 @@ def pytest_collection_modifyitems(config, items):
actual_version = [0, 0, 0]
for build_info_item in gdal.VersionInfo("BUILD_INFO").strip().split("\n"):
if build_info_item.startswith("CURL_VERSION="):
actual_version = [
int(x)
for x in build_info_item[len("CURL_VERSION=") :].split(".")
]
curl_version = build_info_item[len("CURL_VERSION=") :]
# Remove potential -rcX postfix.
dashrc_pos = curl_version.find("-rc")
if dashrc_pos > 0:
curl_version = curl_version[0:dashrc_pos]
actual_version = [int(x) for x in curl_version.split(".")]

if actual_version < required_version:
item.add_marker(
Expand Down

0 comments on commit 47d4e19

Please sign in to comment.