[build] Fix wheel generation for multiple python versions

Cr-Mirrored-From: https://chromium.googlesource.com/external/github.com/SeleniumHQ/selenium
Cr-Mirrored-Commit: 9352cb73528c00271485db2d6e1d1ea1bbfc47a1
diff --git a/rules_python_any_version_wheel.patch b/rules_python_any_version_wheel.patch
index 9b9ee0a..9d640cb 100644
--- a/rules_python_any_version_wheel.patch
+++ b/rules_python_any_version_wheel.patch
@@ -33,4 +33,37 @@
 +        doc = "Supported Python major version. 'py2' and/or 'py3'",
      ),
      "version": attr.string(
-         mandatory = True,
\ No newline at end of file
+         mandatory = True,
+diff --git experimental/rules_python/wheelmaker.py experimental/rules_python/wheelmaker.py
+index 6be5d38..34b5cb0 100644
+--- experimental/rules_python/wheelmaker.py
++++ experimental/rules_python/wheelmaker.py
+@@ -61,14 +61,14 @@ class WheelMaker(object):
+         components = [self._name, self._version]
+         if self._build_tag:
+             components.append(self._build_tag)
+-        components += [self._python_tag, self._abi, self._platform]
++        components += [".".join(self._python_tag), self._abi, self._platform]
+         return '-'.join(components) + '.whl'
+
+     def distname(self):
+         return self._name + '-' + self._version
+
+     def disttags(self):
+-        return ['-'.join([self._python_tag, self._abi, self._platform])]
++        return ['-'.join([tag, self._abi, self._platform]) for tag in self._python_tag]
+
+     def distinfo_path(self, basename):
+         return self.distname() + '.dist-info/' + basename
+@@ -206,7 +206,10 @@ def main():
+                                 help="Version of the distribution")
+     metadata_group.add_argument('--build_tag', type=str, default='',
+                                 help="Optional build tag for the distribution")
+-    metadata_group.add_argument('--python_tag', type=str, default='py3',
++    metadata_group.add_argument('--python_tag',
++                                type=str,
++                                default=[],
++                                action="append",
+                                 help="Python version, e.g. 'py2' or 'py3'")
+     metadata_group.add_argument('--abi', type=str, default='none')
+     metadata_group.add_argument('--platform', type=str, default='any',