Skip to content

Commit

Permalink
Use install repo from libmamba in mamba.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoinePrv committed Jun 23, 2023
1 parent efc5007 commit c974558
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions mamba/mamba/mamba.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
get_installed_jsonfile,
init_api_context,
load_channels,
load_conda_installed,
print_activate,
to_txn,
)
Expand Down Expand Up @@ -175,13 +174,9 @@ def remove(args, parser):
repos = []

# add installed
if use_mamba_experimental:
prefix_data = api.PrefixData(context.target_prefix)
repo = api.Repo(pool, prefix_data)
repos.append(repo)
else:
repo = load_conda_installed(pool, installed_json_f, installed_pkg_recs)
repos.append(repo)
prefix_data = api.PrefixData(context.target_prefix)
repo = api.Repo(pool, prefix_data)
repos.append(repo)

solver = api.Solver(pool, solver_options)

Expand Down Expand Up @@ -454,12 +449,8 @@ def install(args, parser, command="install"):
prefix_data = api.PrefixData(context.target_prefix)

# add installed
if use_mamba_experimental:
repo = api.Repo(pool, prefix_data)
repos.append(repo)
else:
repo = load_conda_installed(pool, installed_json_f, installed_pkg_recs)
repos.append(repo)
repo = api.Repo(pool, prefix_data)
repos.append(repo)

if newenv and not specs:
# creating an empty environment with e.g. "mamba create -n my_env"
Expand Down

0 comments on commit c974558

Please sign in to comment.