Skip to content

Commit f5a6aee

Browse files
authored
Merge commit from fork
* Handle conda-index import error and disable dependency in pyproject.toml. * Update conda_build/index.py
1 parent cd2a2e2 commit f5a6aee

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

conda_build/index.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from conda.base.context import context
1212
from conda.exceptions import CondaHTTPError
1313
from conda.utils import url_path
14-
from conda_index.index import update_index as _update_index
1514

1615
from . import utils
1716
from .utils import (
@@ -21,6 +20,14 @@
2120
if TYPE_CHECKING:
2221
from conda.models.channels import Channel
2322

23+
try:
24+
from conda_index.index import update_index as _update_index
25+
except ImportError:
26+
raise ImportError(
27+
"conda-build requires conda-index to be installed. Please install conda-index using conda."
28+
)
29+
30+
2431
try:
2532
from conda.core.index import Index
2633
except ImportError:

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ dependencies = [
2525
"beautifulsoup4",
2626
"chardet",
2727
"conda >=23.7.0",
28-
"conda-index >=0.4.0",
28+
# Disabled due to conda-index not being available on PyPI
29+
# "conda-index >=0.4.0",
2930
"conda-package-handling >=2.2.0",
3031
"filelock",
3132
"frozendict >=2.4.2",

0 commit comments

Comments
 (0)