mirror of https://github.com/pypa/pip
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:
parent
e47734ed03
commit
4ea00f2f1b
|
@ -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,
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue