2 parents 138a7d8 + 1a1a539 commit 913e215Copy full SHA for 913e215
2 files changed
rules_python/piptool.py
@@ -165,10 +165,12 @@ def pip_install():
165
all_requirements = _requirements.values()
166
167
def requirement(name):
168
- name = name.replace("-", "_").lower()
169
- return _requirements[name]
+ name_key = name.replace("-", "_").lower()
+ if name_key not in _requirements:
170
+ fail("Could not find pip-provided dependency: '%s'" % name)
171
+ return _requirements[name_key]
172
""".format(input=args.input,
- whl_libraries='\n'.join(map(whl_library, whls)),
173
+ whl_libraries='\n'.join(map(whl_library, whls)) if whls else "pass",
174
mappings=','.join([
175
'"%s": "@%s//:pkg"' % (wheel.distribution().lower(), wheel.repository_name())
176
for wheel in whls
tools/piptool.par
123 Bytes
0 commit comments