Skip to content

Commit

Permalink
fix: don't crash if there are no dependencies (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigma67 authored Dec 18, 2023
1 parent b7d54e6 commit a58f9c0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pdm_build_locked/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,5 @@ def update_metadata_with_locked(metadata: dict[str, Any], root: Path) -> None:
requirements.append(requirement_dict_to_string(package))
except UnsupportedRequirement as e:
print(f"Skipping unsupported requirement: {e}")
if not requirements:
raise UnsupportedRequirement(f"No valid PEP 508 requirements are found for group {group}")

metadata.setdefault("optional-dependencies", {})[locked_group] = requirements

0 comments on commit a58f9c0

Please sign in to comment.