Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Jul 21, 2021. It is now read-only.

Commit 77735bd

Browse filesBrowse files
committed
fixes
1 parent d8c1e09 commit 77735bd
Copy full SHA for 77735bd

File tree

2 files changed

+5
-6
lines changed
Filter options

2 files changed

+5
-6
lines changed

‎python/whl.bzl

Copy file name to clipboardExpand all lines: python/whl.bzl
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ def _whl_impl(repository_ctx):
2424
]
2525

2626
if repository_ctx.attr.extras:
27-
args += ["--extras", ",".join(repository_ctx.attr.extras)]
27+
args += [
28+
"--extras=%s" % extra
29+
for extra in repository_ctx.attr.extras
30+
]
2831

2932
result = repository_ctx.execute(args)
3033
if result.return_code:

‎rules_python/whl.py

Copy file name to clipboardExpand all lines: rules_python/whl.py
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,6 @@ def _parse_metadata(self, content):
110110
name_pattern = re.compile('Name: (.*)')
111111
return { 'name': name_pattern.search(content).group(1) }
112112

113-
class SplitByCommaAndAppend(argparse._AppendAction):
114-
def __call__(self, parser, namespace, values, option_string=None):
115-
for val in values.split(','):
116-
super(SplitByCommaAndAppend, self).__call__(parser, namespace, val, option_string)
117113

118114
parser = argparse.ArgumentParser(
119115
description='Unpack a WHL file as a py_library.')
@@ -127,7 +123,7 @@ def __call__(self, parser, namespace, values, option_string=None):
127123
parser.add_argument('--directory', action='store', default='.',
128124
help='The directory into which to expand things.')
129125

130-
parser.add_argument('--extras', action=SplitByCommaAndAppend,
126+
parser.add_argument('--extras', action='append',
131127
help='The set of extras for which to generate library targets.')
132128

133129
def main():

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.