Exemplo n.º 1
0
 def parse_tag(
     index,  # type: int
     tag,  # type: List[Any]
 ):
     # type: (...) -> tags.Tag
     if len(tag) != 3 or not all(
         isinstance(component, compatibility.string) for component in tag
     ):
         raise ValueError(
             "Serialized platform tags should be lists of three strings. Tag {index} of "
             "{count} was: {tag!r}.".format(index=index, count=count, tag=tag)
         )
     interpreter, abi, platform = tag
     return tags.Tag(interpreter=interpreter, abi=abi, platform=platform)
Exemplo n.º 2
0
 def iter_tags():
     for (interpreter, abi, platform) in supported_tags:
         yield tags.Tag(interpreter=interpreter,
                        abi=abi,
                        platform=platform)
Exemplo n.º 3
0
 def tag(self):
     # type: () -> tags.Tag
     return tags.Tag(interpreter=self.interpreter, abi=self.abi, platform=self.platform)
Exemplo n.º 4
0
 def iter_tags():
     for supported_tag in supported_tags:
         yield tags.Tag(interpreter=supported_tag['interpreter'],
                        abi=supported_tag['abi'],
                        platform=supported_tag['platform'])