Skip to content

Commit

Permalink
Defer to poetry.lock validation for direct origin sources
Browse files Browse the repository at this point in the history
  • Loading branch information
spoorn committed Mar 21, 2023
1 parent 2721c31 commit 48c8c43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/poeblix/validatedocker.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def _validate_pyproject_toml(self, docker_deps: dict):
required_packages = self.poetry.package.requires
for package in required_packages:
name = package.pretty_name
if name in docker_deps:
# Defer to poetry.lock validation if dpeendency is a direct origin source such as git, local path, etc.
if not package.is_direct_origin() and name in docker_deps:
if Package(name, docker_deps[name]).satisfies(package):
docker_deps.pop(name)
else:
Expand Down
3 changes: 2 additions & 1 deletion src/poeblix/validatewheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ def _validate_pyproject_toml(self, requires_dist: Dict[str, str], leftover_wheel
leftover_pyproject_packages = set([p.pretty_name for p in required_packages])
for package in required_packages:
name = package.pretty_name
if name in requires_dist:
# Defer to poetry.lock validation if dpeendency is a direct origin source such as git, local path, etc.
if not package.is_direct_origin() and name in requires_dist:
leftover_pyproject_packages.remove(name)
leftover_wheel_packages.discard(name)
# Parse constraint into an object using poetry's helper
Expand Down

0 comments on commit 48c8c43

Please sign in to comment.