8000 Merge pull request #39 from hwright/master · bazel-contrib/rules_python@1a1a539 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1a1a539

Browse files
authored
Merge pull request #39 from hwright/master
Add a better error message when deps not found
2 parents 49a434b + 7861c73 commit 1a1a539

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

rules_python/piptool.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,10 @@ def pip_install():
138138
all_requirements = _requirements.values()
139139
140140
def requirement(name):
141-
name = name.replace("-", "_").lower()
142-
return _requirements[name]
141+
name_key = name.replace("-", "_").lower()
142+
if name_key not in _requirements:
143+
fail("Could not find pip-provided dependency: '%s'" % name)
144+
return _requirements[name_key]
143145
""".format(input=args.input,
144146
whl_libraries='\n'.join(map(whl_library, whls)) if whls else "pass",
145147
mappings=','.join([

tools/piptool.par

96 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)
0