Skip to content

Commit

Permalink
CI: fix: re-instate 'gvmap.sh' detection skipping on MinGW
Browse files Browse the repository at this point in the history
Python 3.12 made some changes to how `shutil.which` functions that caused shell
scripts like gvmap.sh to now be detectable on Windows.
97b0c0b explains some of the backstory to this.
18ebd12 fixed various CI failures that began
occurring when this Python change propagated to MinGW in CI.

CI has now started once again failing on MinGW. Inspecting the diff between a
passing and failing run reveals Python has moved from 3.12.7-2 to 3.12.7-3. The
diff between these two appears to be the backporting of a claimed fix to
`shutil.which`.¹ Discussion of the underlying issue² seems to point to
significant disagreement between Python contributors on what the desirable
behavior of `shutil.which` is in these scenarios. It is also not clear to me how
gvmap.sh ends up non-executable (and thus affected by this) given its CMake
installation rule seems to add executability.

Rather than trying to continue accommodating Python changing its `shutil.which`
semantics, this change skips testing of this scenario.

¹ msys2/MINGW-packages@32bd97e
² python/cpython#127001
  • Loading branch information
Smattr committed Nov 24, 2024
1 parent 40e6f92 commit b956911
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ci/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ def test_existence(binary: str):
check_that_tool_does_not_exist(binary, os_id)
pytest.skip("smyrna is not built on non-Linux due to lacking dependencies")

if binary == "gvmap.sh" and is_mingw():
pytest.skip(f"{binary} detection is unreliable on MinGW")

if binary == "vimdot" and platform.system() == "Windows":
check_that_tool_does_not_exist(binary, os_id)
pytest.skip(f"{binary} is not installed on Windows")
Expand Down

0 comments on commit b956911

Please sign in to comment.