File tree Expand file tree Collapse file tree 5 files changed +470
-34
lines changed
Expand file tree Collapse file tree 5 files changed +470
-34
lines changed Original file line number Diff line number Diff line change @@ -1383,7 +1383,6 @@ def test_nt_helpers(self):
13831383 self .assertIsInstance (b_final_path , bytes )
13841384 self .assertGreater (len (b_final_path ), 0 )
13851385
1386- @unittest .expectedFailure # TODO: RUSTPYTHON
13871386 @unittest .skipIf (sys .platform != 'win32' , "Can only test junctions with creation on win32." )
13881387 def test_isjunction (self ):
13891388 with os_helper .temp_dir () as d :
Original file line number Diff line number Diff line change @@ -3130,7 +3130,6 @@ def tearDown(self):
31303130 if os .path .lexists (self .junction ):
31313131 os .unlink (self .junction )
31323132
3133- @unittest .expectedFailureIfWindows ("TODO: RUSTPYTHON; (AttributeError: module '_winapi' has no attribute 'CreateJunction')" )
31343133 def test_create_junction (self ):
31353134 _winapi .CreateJunction (self .junction_target , self .junction )
31363135 self .assertTrue (os .path .lexists (self .junction ))
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ fn main() {
1616 {
1717 let canonicalized_path = std:: fs:: canonicalize ( real_path)
1818 . expect ( "failed to resolve RUSTPYTHONPATH during build time" ) ;
19- println ! (
20- "cargo:rustc-env=win_lib_path={}" ,
21- canonicalized_path . to_str ( ) . unwrap ( )
22- ) ;
19+ // Strip the extended path prefix (\\?\) that canonicalize adds on Windows
20+ let path_str = canonicalized_path . to_str ( ) . unwrap ( ) ;
21+ let path_str = path_str . strip_prefix ( r"\\?\" ) . unwrap_or ( path_str ) ;
22+ println ! ( "cargo:rustc-env=win_lib_path={path_str}" ) ;
2323 }
2424}
2525
Original file line number Diff line number Diff line change @@ -124,7 +124,9 @@ features = [
124124 " Win32_System_Console" ,
125125 " Win32_System_Diagnostics_Debug" ,
126126 " Win32_System_Environment" ,
127+ " Win32_System_IO" ,
127128 " Win32_System_Ioctl" ,
129+ " Win32_System_Kernel" ,
128130 " Win32_System_LibraryLoader" ,
129131 " Win32_System_Memory" ,
130132 " Win32_System_Performance" ,
You can’t perform that action at this time.
0 commit comments