File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
crates/spin-python-cli/src Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1515 zstd:: Decoder ,
1616} ;
1717
18+ #[ cfg( unix) ]
19+ const NATIVE_PATH_DELIMITER : char = ':' ;
20+
21+ #[ cfg( windows) ]
22+ const NATIVE_PATH_DELIMITER : char = ';' ;
23+
1824/// A Spin plugin to convert Python apps to Spin-compatible WebAssembly modules
1925#[ derive( Parser , Debug ) ]
2026#[ command( author, version, about, name = "py2wasm" ) ]
@@ -62,7 +68,7 @@ fn main() -> Result<()> {
6268
6369 let python_path = options
6470 . python_path
65- . split ( ':' )
71+ . split ( NATIVE_PATH_DELIMITER )
6672 . enumerate ( )
6773 . map ( |( index, path) | {
6874 let index = index. to_string ( ) ;
@@ -98,7 +104,7 @@ fn main() -> Result<()> {
98104 let mut python_path = options. python_path ;
99105 if let Some ( site_packages) = find_site_packages ( ) ? {
100106 python_path = format ! (
101- "{python_path}: {}" ,
107+ "{python_path}{NATIVE_PATH_DELIMITER} {}" ,
102108 site_packages
103109 . to_str( )
104110 . context( "non-UTF-8 site-packages name" ) ?
You can’t perform that action at this time.
0 commit comments