This commit is contained in:
Hind-M 2024-10-30 10:20:58 +01:00 committed by GitHub
parent 0075a24e4c
commit b94b30e941
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 3 deletions

View File

@ -41,8 +41,10 @@ The first way to add a repository is from a list of |PackageInfo| using
import libmambapy
channel_alias = libmambapy.specs.CondaURL.parse("https://conda.anaconda.org")
db = libmambapy.solver.libsolv.Database(
libmambapy.specs.ChannelResolveParams(channel_alias="https://conda.anaconda.org")
libmambapy.specs.ChannelResolveParams(channel_alias=channel_alias)
)
repo1 = db.add_repo_from_packages(

View File

@ -151,11 +151,12 @@ All parameters that influence this resolution must be provided explicitly.
.. code:: python
import libmambapy.specs as specs
import libmambapy.specs.CondaURL as CondaURL
uc = specs.UnresolvedChannel.parse("conda-forge[prius-avx42]")
chan, *_ = specs.Channel.resolve(
uc,
channel_alias="https://repo.mamba.pm"
channel_alias=CondaURL.parse("https://repo.mamba.pm")
# ...
)
@ -168,11 +169,12 @@ There are no hard-coded names:
.. code:: python
import libmambapy.specs as specs
import libmambapy.specs.CondaURL as CondaURL
uc = specs.UnresolvedChannel.parse("defaults")
chan, *_ = specs.Channel.resolve(
uc,
channel_alias="https://repo.mamba.pm"
channel_alias=CondaURL.parse("https://repo.mamba.pm")
# ...
)