mirror of https://github.com/mamba-org/mamba.git
Add missing bidings and other improvements (#3990)
This commit is contained in:
parent
7cdf568d80
commit
1f226d6108
|
@ -156,24 +156,24 @@ namespace mamba
|
|||
LinkParams link_params;
|
||||
|
||||
download::RemoteFetchParams remote_fetch_params = {
|
||||
/* .ssl_verify */ { "" },
|
||||
/* .ssl_no_revoke */ false,
|
||||
/* .curl_initialized */ false,
|
||||
/* .user_agent */ { "mamba/" LIBMAMBA_VERSION_STRING },
|
||||
/* .connect_timeout_secs */ 10.,
|
||||
/* .retry_timeout */ 2,
|
||||
/* .retry_backoff */ 3,
|
||||
/* .max_retries */ 3,
|
||||
/* .proxy_servers */ {},
|
||||
.ssl_verify = { "" },
|
||||
.ssl_no_revoke = false,
|
||||
.curl_initialized = false,
|
||||
.user_agent = { "mamba/" LIBMAMBA_VERSION_STRING },
|
||||
.connect_timeout_secs = 10.,
|
||||
.retry_timeout = 2,
|
||||
.retry_backoff = 3,
|
||||
.max_retries = 3,
|
||||
.proxy_servers = {},
|
||||
};
|
||||
|
||||
download::Options download_options() const
|
||||
{
|
||||
return {
|
||||
/* .download_threads */ this->threads_params.download_threads,
|
||||
/* .fail_fast */ false,
|
||||
/* .sort */ true,
|
||||
/* .verbose */ this->output_params.verbosity >= 2,
|
||||
.download_threads = this->threads_params.download_threads,
|
||||
.fail_fast = false,
|
||||
.sort = true,
|
||||
.verbose = this->output_params.verbosity >= 2,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -195,31 +195,33 @@ namespace mamba
|
|||
};
|
||||
|
||||
return {
|
||||
/* .local_repodata_ttl */ get_local_repodata_ttl(),
|
||||
/* .offline */ this->offline,
|
||||
/* .force_use_zst */ false // Must override based on ChannelContext
|
||||
.local_repodata_ttl_s = get_local_repodata_ttl(),
|
||||
.offline = this->offline,
|
||||
.repodata_force_use_zst = false // Must override based on ChannelContext
|
||||
};
|
||||
}
|
||||
|
||||
SubdirDownloadParams subdir_download_params() const
|
||||
{
|
||||
return {
|
||||
/* .offline */ this->offline,
|
||||
/* .repodata_check_zst */ this->repodata_use_zst,
|
||||
.offline = this->offline,
|
||||
.repodata_check_zst = this->repodata_use_zst,
|
||||
};
|
||||
}
|
||||
|
||||
TransactionParams transaction_params() const
|
||||
{
|
||||
return { /* .is_mamba_exe */ command_params.is_mamba_exe,
|
||||
/* .json_output */ output_params.json,
|
||||
/* .verbosity */ output_params.verbosity,
|
||||
/* .shortcut */ shortcuts,
|
||||
/* .envs_dirs */ envs_dirs,
|
||||
/* .platform */ platform,
|
||||
/* .prefix_params */ prefix_params,
|
||||
/* .link_params */ link_params,
|
||||
/* .threads_params */ threads_params };
|
||||
return {
|
||||
.is_mamba_exe = command_params.is_mamba_exe,
|
||||
.json_output = output_params.json,
|
||||
.verbosity = output_params.verbosity,
|
||||
.shortcuts = shortcuts,
|
||||
.envs_dirs = envs_dirs,
|
||||
.platform = platform,
|
||||
.prefix_params = prefix_params,
|
||||
.link_params = link_params,
|
||||
.threads_params = threads_params,
|
||||
};
|
||||
}
|
||||
|
||||
std::size_t lock_timeout = 0;
|
||||
|
|
|
@ -1167,6 +1167,7 @@ bind_submodule_impl(pybind11::module_ m)
|
|||
.def_readwrite("output_params", &Context::output_params)
|
||||
.def_readwrite("threads_params", &Context::threads_params)
|
||||
.def_readwrite("prefix_params", &Context::prefix_params)
|
||||
.def_readwrite("link_params", &Context::link_params)
|
||||
.def_readwrite("validation_params", &Context::validation_params);
|
||||
|
||||
static const auto default_transaction_params = TransactionParams{};
|
||||
|
|
|
@ -501,8 +501,10 @@ namespace mambapy
|
|||
)
|
||||
.def("is_package", &Channel::is_package)
|
||||
.def_property("url", &Channel::url, &Channel::set_url)
|
||||
.def_property_readonly("mirror_urls", &Channel::mirror_urls)
|
||||
.def_property("platforms", &Channel::platforms, &Channel::set_platforms)
|
||||
.def_property("display_name", &Channel::display_name, &Channel::set_display_name)
|
||||
.def_property_readonly("id", &Channel::id)
|
||||
.def("platform_url", &Channel::platform_url)
|
||||
.def("platform_urls", &Channel::platform_urls)
|
||||
.def("url_equivalent_with", &Channel::url_equivalent_with)
|
||||
|
|
Loading…
Reference in New Issue