Skip to content

Commit

Permalink
take into account branch,tag or rev on git dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhmg committed Jun 29, 2024
1 parent fcb8d53 commit 3d1a62e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion conda_lock/src_parser/pyproject_toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,16 @@ def parse_poetry_pyproject_toml(
version = poetry_version_spec

if "git" in depattrs and url is not None:
url, rev = unpack_git_url(url)
url, at_rev = unpack_git_url(url)
rev = (
depattrs.get("branch") or depattrs.get("tag") or depattrs.get("rev")
)
if rev is None:
rev = at_rev
elif at_rev is not None and at_rev != rev:
raise ValueError(
f"git dependency {depname} has conflicting rev ({rev}) and url@rev {at_rev} specified"
)
dependencies.append(
VCSDependency(
name=name,
Expand Down

0 comments on commit 3d1a62e

Please sign in to comment.