Bind package extraction (#3882)

This commit is contained in:
Antoine Prouvost 2025-04-08 10:45:14 +02:00 committed by GitHub
parent f4c7a3d559
commit d7c14cdd9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 17 additions and 0 deletions

View File

@ -1202,6 +1202,23 @@ bind_submodule_impl(pybind11::module_ m)
py::arg("compression_threads") = 1
);
m.def(
"extract_package",
[](const fs::u8path& file, const fs::u8path& destination, bool sparse)
{
return extract(
file,
destination,
ExtractOptions{
/* .sparse= */ sparse,
// Unused by this function so we're not making it part of the API
/* .subproc_mode= */ extract_subproc_mode::mamba_package,
}
);
}
);
m.def("init_console", &init_console);
// fix extract from error_handling first