@@ -137,8 +137,12 @@ def _make_candidate_from_link(
137
137
# type: (...) -> Optional[Candidate]
138
138
# TODO: Check already installed candidate, and use it if the link and
139
139
# editable flag match.
140
+
140
141
if link in self ._build_failures :
142
+ # We already tried this candidate before, and it does not build.
143
+ # Don't bother trying again.
141
144
return None
145
+
142
146
if template .editable :
143
147
if link not in self ._editable_candidate_cache :
144
148
try :
@@ -163,6 +167,7 @@ def _make_candidate_from_link(
163
167
self ._build_failures [link ] = e
164
168
return None
165
169
base = self ._link_candidate_cache [link ]
170
+
166
171
if extras :
167
172
return ExtrasCandidate (base , extras )
168
173
return base
@@ -296,6 +301,12 @@ def make_requirement_from_install_req(self, ireq, requested_extras):
296
301
version = None ,
297
302
)
298
303
if cand is None :
304
+ # There's no way we can satisfy a URL requirement if the underlying
305
+ # candidate fails to build. An unnamed URL must be user-supplied, so
306
+ # we fail eagerly. If the URL is named, an unsatisfiable requirement
307
+ # can make the resolver do the right thing, either backtrack (and
308
+ # maybe find some other requirement that's buildable) or raise a
309
+ # ResolutionImpossible eventually.
299
310
if not ireq .name :
300
311
raise self ._build_failures [ireq .link ]
301
312
return UnsatisfiableRequirement (canonicalize_name (ireq .name ))
0 commit comments