removed dependency on conda-index (#2964)

This commit is contained in:
Johan Mabille 2023-11-08 22:15:05 +01:00 committed by GitHub
parent d116ff8917
commit 21c6d73680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 37 deletions

View File

@ -32,7 +32,6 @@ dependencies:
- requests
- sel(win): pywin32
- sel(win): menuinst
- conda-index
- conda-content-trust
- conda-package-handling
- cryptography<40.0 # Or breaks conda-content-trust

View File

@ -4,7 +4,6 @@ import shutil
import subprocess
from pathlib import Path
import conda_index.index
import pytest
import requests
import yaml
@ -1160,38 +1159,3 @@ def download(url: str, out: Path):
file.write(response.content)
else:
raise Exception(f'Failed to download URL "{url}"')
@pytest.mark.skipif(
platform.system() == "Windows",
reason="Too many bugs runnning conda-index on Windows CI",
)
def test_create_local(tmp_home, tmp_root_prefix):
"""The name "local" is a hard-coded custom multichannel."""
name = "attrs"
plat = "noarch"
fn = "attrs-23.1.0-pyh71513ae_1.conda"
conda_bld = (tmp_root_prefix / "conda-bld").expanduser().resolve()
(conda_bld / plat).mkdir(parents=True)
download(
url=f"https://conda.anaconda.org/conda-forge/{plat}/{fn}",
out=conda_bld / plat / fn,
)
conda_index.index.ChannelIndex(
str(conda_bld), channel_name="conda-bld", threads=1
).index(None)
res = helpers.create(
"-n", "myenv", "--override-channels", "-c", "local", "-y", name, "--json"
)
attrs_link_pkg = None
for pkg in res["actions"]["LINK"]:
if pkg["name"] == name:
attrs_link_pkg = pkg
assert attrs_link_pkg["url"].startswith("file://")
assert attrs_link_pkg["url"].endswith(fn)