File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ def main():
16
16
marker_files = [Path (p ) for p in glob ("target/**/main.c" , recursive = True )]
17
17
marker_files .sort (key = lambda path : path .stat ().st_mtime )
18
18
build_dir = marker_files [0 ].parent
19
+ print (f"Located build directory '{ build_dir } '" )
19
20
20
21
# Collect all relevant Rust and C files
21
22
add_files = glob ("**/*.rs" , recursive = True , root_dir = build_dir )
@@ -38,11 +39,19 @@ def main():
38
39
39
40
40
41
if __name__ == "__main__" :
42
+ # FIXME(ci): remove after the bump to windoes-2025 GHA images
43
+ # Python <= 3.9 does not support the very helpful `root_dir` argument,
44
+ # and that is the version used by the Windows GHA images. Rather than
45
+ # using setup-python or doing something in the CI script, just find
46
+ # the newer version and relaunch if this happens to be run with an old
47
+ # version.
41
48
try :
42
- print ("okay" )
43
49
glob ("" , root_dir = "" )
44
50
except TypeError :
45
- print (f"failed with { sys .version } " )
51
+ if os .environ .get ("CI" ) is None :
52
+ sys .exit (1 )
53
+
54
+ # Find the next 3.1x Python version
46
55
dirs = sorted (list (Path (r"C:\hostedtoolcache\windows\Python" ).iterdir ()))
47
56
usepy = next (x for x in dirs if r"\3.1" in str (x ))
48
57
py = usepy .joinpath (r"x64\python.exe" )
You can’t perform that action at this time.
0 commit comments