Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .support/update_pyproject_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,24 @@ def load_yaml(yaml_file: str) -> dict:

yaml_bounds = {}
for dependency in data["dependencies"]:
if isinstance(dependency, dict):
# A YAML `- pip:` block (PyPI-only deps installed by conda's
# pip backend) parses as a dict; descend into its list and
# capture the `==`-pinned entries. Anything without `==` is
# ignored — `load_yaml` only collects exact version bounds.
if "pip" in dependency:
for pip_dependency in dependency["pip"]:
if "==" in pip_dependency:
package, version = split_dependency(
pip_dependency, "==", allow_no_version=True
)
yaml_bounds[package] = version
else:
raise ValueError(
f"Unsupported dict-typed dependency entry in {yaml_file!r}: "
f"{dependency!r}. Only `pip:` sub-lists are recognised."
)
continue
package, version = split_dependency(dependency, "=", allow_no_version=True)
yaml_bounds[package] = version
return yaml_bounds
Expand Down