Skip to content

Commit

Permalink
Adjust test that check if a generic wheel is present or not
Browse files Browse the repository at this point in the history
Part of it/e3-core#8
  • Loading branch information
Nikokrock committed Aug 6, 2024
1 parent fd84913 commit a214599
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/e3/python/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,12 +624,16 @@ def add_requirement(self, req: str | Requirement) -> None:
def file_closure(self) -> list[str]:
reqs = self._requirements_closure()
result = set()

for req in reqs:

# First check if there is a generic wheel present or no. If there is
# one then there is no need to package the sources.
has_generic_wheel = any(
(
c
for c in self.pypi.candidate_cache[canonicalize_name(req.name)]
if c.is_generic_wheel
if c.is_generic_wheel and c.version in req.specifier
)
)

Expand Down

0 comments on commit a214599

Please sign in to comment.