Skip to content

Commit d7c14cd

Browse files
authored
Bind package extraction (#3882)
1 parent f4c7a3d commit d7c14cd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

libmambapy/src/libmambapy/bindings/legacy.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,23 @@ bind_submodule_impl(pybind11::module_ m)
12021202
py::arg("compression_threads") = 1
12031203
);
12041204

1205+
m.def(
1206+
"extract_package",
1207+
[](const fs::u8path& file, const fs::u8path& destination, bool sparse)
1208+
{
1209+
return extract(
1210+
file,
1211+
destination,
1212+
ExtractOptions{
1213+
/* .sparse= */ sparse,
1214+
// Unused by this function so we're not making it part of the API
1215+
/* .subproc_mode= */ extract_subproc_mode::mamba_package,
1216+
}
1217+
);
1218+
}
1219+
);
1220+
1221+
12051222
m.def("init_console", &init_console);
12061223

12071224
// fix extract from error_handling first

0 commit comments

Comments
 (0)