8000 Merge branch 'master' into dgreiman/issue17 · raaaar/rules_python@913e215 · GitHub
[go: up one dir, main page]

Skip to content

Commit 913e215

Browse files
author
Douglas Greiman
authored
Merge branch 'master' into dgreiman/issue17
2 parents 138a7d8 + 1a1a539 commit 913e215

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

rules_python/piptool.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,12 @@ def pip_install():
165165
all_requirements = _requirements.values()
166166
167167
def requirement(name):
168-
name = name.replace("-", "_").lower()
169-
return _requirements[name]
168+
name_key = name.replace("-", "_").lower()
169+
if name_key not in _requirements:
170+
fail("Could not find pip-provided dependency: '%s'" % name)
171+
return _requirements[name_key]
170172
""".format(input=args.input,
171-
whl_libraries='\n'.join(map(whl_library, whls)),
173+
whl_libraries='\n'.join(map(whl_library, whls)) if whls else "pass",
172174
mappings=','.join([
173175
'"%s": "@%s//:pkg"' % (wheel.distribution().lower(), wheel.repository_name())
174176
for wheel in whls

tools/piptool.par

123 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)
0