diff --git a/src/poeblix/validatedocker.py b/src/poeblix/validatedocker.py index ac7d1e7..c453ac6 100644 --- a/src/poeblix/validatedocker.py +++ b/src/poeblix/validatedocker.py @@ -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: diff --git a/src/poeblix/validatewheel.py b/src/poeblix/validatewheel.py index 6970955..67482da 100644 --- a/src/poeblix/validatewheel.py +++ b/src/poeblix/validatewheel.py @@ -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