The preparer always clones VCS requirements

Previously, in download mode, it did a vcs export,
which did not include vcs information, leading to
issues when the build backend required it.
This commit is contained in:
Stéphane Bidoul 2020-12-23 10:42:48 +01:00
parent e47734ed03
commit 4ea00f2f1b
No known key found for this signature in database
GPG Key ID: BCAB2555446B5B92
2 changed files with 4 additions and 7 deletions

View File

@ -570,7 +570,7 @@ class RequirementPreparer(object):
'hash.'.format(req)
)
req.ensure_has_source_dir(self.src_dir)
req.update_editable(self.download_dir is None)
req.update_editable()
dist = _get_prepared_distribution(
req, self.req_tracker, self.finder, self.build_isolation,

View File

@ -617,8 +617,8 @@ class InstallRequirement(object):
)
# For editable installations
def update_editable(self, obtain=True):
# type: (bool) -> None
def update_editable(self):
# type: () -> None
if not self.link:
logger.debug(
"Cannot update repository at %s; repository location is "
@ -651,10 +651,7 @@ class InstallRequirement(object):
)
deprecated(reason, replacement, gone_in="21.0", issue=7554)
hidden_url = hide_url(self.link.url)
if obtain:
vcs_backend.obtain(self.source_dir, url=hidden_url)
else:
vcs_backend.export(self.source_dir, url=hidden_url)
vcs_backend.obtain(self.source_dir, url=hidden_url)
else:
assert 0, (
'Unexpected version control type (in {}): {}'.format(