Skip to content

Commit

Permalink
[WIP] hack
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Oct 12, 2021
1 parent ed8ca7a commit 4fcbe5d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/pip/_internal/distributions/sdist.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import logging
from typing import Iterable, Set, Tuple

from pip._vendor.pep517.wrappers import HookMissing

from pip._internal.build_env import BuildEnvironment
from pip._internal.distributions.base import AbstractDistribution
from pip._internal.exceptions import InstallationError
Expand Down Expand Up @@ -42,7 +44,10 @@ def _setup_isolation(self, finder: PackageFinder) -> None:
# This must be done in a second pass, as the pyproject.toml
# dependencies must be installed before we can call the backend.
if self.req.editable and self.req.permit_editable_wheels:
build_reqs = self._get_build_requires_editable()
try:
build_reqs = self._get_build_requires_editable()
except HookMissing:
build_reqs = self._get_build_requires_wheel()
else:
build_reqs = self._get_build_requires_wheel()
self._install_build_reqs(finder, build_reqs)
Expand Down
2 changes: 1 addition & 1 deletion src/pip/_vendor/pep517/in_process/_in_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def get_requires_for_build_editable(config_settings):
try:
hook = backend.get_requires_for_build_editable
except AttributeError:
return []
raise HookMissing()
else:
return hook(config_settings)

Expand Down

0 comments on commit 4fcbe5d

Please sign in to comment.