Skip to content

Commit

Permalink
Keep hashes when the condidate is reused
Browse files Browse the repository at this point in the history
Fix #11
  • Loading branch information
frostming committed Feb 4, 2020
1 parent 65f1a01 commit 1b921d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions pdm/models/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,13 @@ def _get_dependencies_from_metadata(self, candidate: Candidate) -> CandidateInfo

def get_hashes(self, candidate: Candidate) -> Optional[Dict[str, str]]:
if (
candidate.hashes
or candidate.req.is_vcs
candidate.req.is_vcs
or candidate.req.is_file_or_url
and candidate.req.is_local_dir
):
return
if candidate.hashes:
return candidate.hashes
req = candidate.req.copy()
req.specifier = SpecifierSet(f"=={candidate.version}")
with _allow_all_wheels():
Expand Down

0 comments on commit 1b921d9

Please sign in to comment.