@@ -1752,9 +1752,7 @@ def _get_feature_sets(
17521752 return (None , features )
17531753
17541754 # do fewer abi3t builds?
1755- # TODO re-enable Windows abi3t builds once 3.15.0b2 is released.
1756- # See https://github.com/python/cpython/issues/149887
1757- if version >= (3 , 15 ) and sys .platform != "win32" :
1755+ if version >= (3 , 15 ):
17581756 return (
17591757 None ,
17601758 "abi3" ,
@@ -1852,7 +1850,18 @@ def _run_cargo_test(
18521850 if extra_flags :
18531851 command .extend (extra_flags )
18541852
1855- _run (session , * command , external = True , env = env or {})
1853+ test_env = dict (env or {})
1854+ if features and "abi3t" in features and sys .platform == "win32" :
1855+ # On the GIL-enabled CPython MSI installation, python3t.dll (the abi3t forwarder) lives
1856+ # in <base_prefix>\abi3t-compat\, not next to python.exe. The interpreter
1857+ # finds it there when importing a .pyd, but our test binaries link it
1858+ # directly and the loader only searches PATH.
1859+ abi3t_compat = Path (sys .base_prefix ) / "abi3t-compat"
1860+ if abi3t_compat .is_dir ():
1861+ path = test_env .get ("PATH" , os .environ .get ("PATH" , "" ))
1862+ test_env ["PATH" ] = os .pathsep .join ((str (abi3t_compat ), path ))
1863+
1864+ _run (session , * command , external = True , env = test_env )
18561865
18571866
18581867def _run_cargo_publish (session : nox .Session , * , package : str ) -> None :
0 commit comments