Exemplo n.º 1
0
 def is_compatible(self):
     '''Is the wheel is compatible with the current platform?'''
     supported_tags = set(map(str, sys_tags()))
     return next((True for t in self.tags() if t in supported_tags), False)
Exemplo n.º 2
0
 def is_compatible(self):
     '''Is the wheel is compatible with the current platform?'''
     supported_tags = set(
         (t.interpreter, t.abi, t.platform) for t in sys_tags())
     return next((True for t in self.tags() if t in supported_tags), False)
Exemplo n.º 3
0
        for k, v in match.groupdict().items():
            setattr(self, k, v)

    def tags(self):
        '''List tags (py_version, abi, platform) supported by this wheel.'''
        return itertools.product(
            self.py_version.split('.'),
            self.abi.split('.'),
            self.platform.split('.'),
        )

    def is_compatible(self):
        '''Is the wheel is compatible with the current platform?'''
<<<<<<< HEAD
        supported_tags = set(
            (t.interpreter, t.abi, t.platform) for t in sys_tags())
=======
        supported_tags = set((t.interpreter, t.abi, t.platform) for t in sys_tags())
>>>>>>> b66a76afa15ab74019740676a52a071b85ed8f71
        return next((True for t in self.tags() if t in supported_tags), False)

    def egg_name(self):
        return pkg_resources.Distribution(
            project_name=self.project_name, version=self.version,
            platform=(None if self.platform == 'any' else get_platform()),
        ).egg_name() + '.egg'

    def get_dist_info(self, zf):
        # find the correct name of the .dist-info dir in the wheel file
        for member in zf.namelist():
            dirname = posixpath.dirname(member)