File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ links = "tauri-plugin-python"
1212tauri = { version = " 2.1.0" }
1313serde = " 1.0"
1414thiserror = " 2"
15- pyo3 = " 0.23.3"
15+ pyo3 = { version = " 0.23.3" , features =[ " auto-initialize " ] }
1616lazy_static = " 1.5.0"
1717
1818[build-dependencies ]
Original file line number Diff line number Diff line change @@ -22,9 +22,8 @@ lazy_static! {
2222 Mutex :: new( marker:: Python :: with_gil( |py| { PyDict :: new( py) . into( ) } ) ) ;
2323}
2424pub fn init_python ( ) -> PyResult < ( ) > {
25- pyo3:: prepare_freethreaded_python ( ) ;
2625 let code = py_main_import:: read_at_startup ( ) ;
27- let c_code = CString :: new ( code) . expect ( "error loading python " ) ;
26+ let c_code = CString :: new ( code) . expect ( "error creating cstring from code " ) ;
2827 marker:: Python :: with_gil ( |py| -> PyResult < ( ) > {
2928 let syspath = py
3029 . import ( "sys" ) ?
You can’t perform that action at this time.
0 commit comments