diff --git a/rules_python/whl.py b/rules_python/whl.py index 3e9d4f88fa..edd7906506 100644 --- a/rules_python/whl.py +++ b/rules_python/whl.py @@ -107,10 +107,10 @@ def expand(self, directory): # _parse_metadata parses METADATA files according to https://www.python.org/dev/peps/pep-0314/ def _parse_metadata(self, content): - # TODO: handle fields other than just name - name_pattern = re.compile('Name: (.*)') - return { 'name': name_pattern.search(content).group(1) } - + # TODO: handle fields other than just name and extras + name = re.compile('Name: (.*)').search(content).group(1) + extras = [extra.strip() for extra in re.findall('Provides-Extra: (.*)', content)] + return { 'name': name, 'extras': extras } parser = argparse.ArgumentParser( description='Unpack a WHL file as a py_library.') diff --git a/tools/piptool.par b/tools/piptool.par index 11ec453cd7..28e0e13e28 100755 Binary files a/tools/piptool.par and b/tools/piptool.par differ diff --git a/tools/whltool.par b/tools/whltool.par index 7cb59c0fbe..f2914a3345 100755 Binary files a/tools/whltool.par and b/tools/whltool.par differ