How to use the wheel.pep425tags.get_platform function in wheel

To help you get started, we’ve selected a few wheel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-sdk-for-python / azure-cognitiveservices-search-websearch / azure_bdist_wheel.py View on Github external
def get_tag(self):
        # bdist sets self.plat_name if unset, we should only use it for purepy
        # wheels if the user supplied it.
        if self.plat_name_supplied:
            plat_name = self.plat_name
        elif self.root_is_pure:
            plat_name = 'any'
        else:
            plat_name = self.plat_name or get_platform()
            if plat_name in ('linux-x86_64', 'linux_x86_64') and sys.maxsize == 2147483647:
                plat_name = 'linux_i686'
        plat_name = plat_name.replace('-', '_').replace('.', '_')


        if self.root_is_pure:
            if self.universal:
                impl = 'py2.py3'
            else:
                impl = self.python_tag
            tag = (impl, 'none', plat_name)
        else:
            impl_name = get_abbr_impl()
            impl_ver = get_impl_ver()
            # PEP 3149
            abi_tag = str(get_abi_tag()).lower()
github cloudify-cosmo / wagon / wagon.py View on Github external
def get_platform():
    return pep425tags.get_platform()
github silx-kit / hdf5plugin / setup.py View on Github external
def finalize_options(self):
            self.plat_name = get_platform()
            if not sys.platform.startswith('win'):
                self.python_tag = "py2.py3"
            bdist_wheel.finalize_options(self)
github google / rekall / rekall-agent / rekall_agent / agent.py View on Github external
release = uname[2]  # XP, 2000, 7
            version = uname[3] + service_pack  # 5.1.2600 SP3, 6.1.7601 SP1
        elif system == "Darwin":
            kernel = uname[2]  # 12.2.0
            release = "OSX"  # OSX
            version = platform.mac_ver()[0]  # 10.8.2
        elif system == "Linux":
            kernel = uname[2]  # 3.2.5
            release = platform.linux_distribution()[0]  # Ubuntu
            version = platform.linux_distribution()[1]  # 12.04

        # Emulate PEP 425 naming conventions - e.g. cp27-cp27mu-linux_x86_64.
        pep425tag = "%s%s-%s-%s" % (pep425tags.get_abbr_impl(),
                                    pep425tags.get_impl_ver(),
                                    str(pep425tags.get_abi_tag()).lower(),
                                    pep425tags.get_platform())

        return cls.from_keywords(
            session=session,
            system=system,
            architecture=architecture,
            node=uname[1],
            release=release,
            version=version,
            machine=uname[4],              # x86, x86_64
            kernel=kernel,
            fqdn=fqdn,
            pep425tag=pep425tag,
        )
github pyside / pyside2-setup / build_scripts / wheel_override.py View on Github external
def get_tag(self):
            # bdist sets self.plat_name if unset, we should only use
            # it for purepy wheels if the user supplied it.
            if self.plat_name_supplied:
                plat_name = self.plat_name
            elif self.root_is_pure:
                plat_name = 'any'
            else:
                plat_name = self.plat_name or wheel_get_platform()
                if plat_name in ('linux-x86_64', 'linux_x86_64') and sys.maxsize == 2147483647:
                    plat_name = 'linux_i686'

                # To allow uploading to pypi, we need the wheel name
                # to contain 'manylinux1'.
                # The wheel which will be uploaded to pypi will be
                # built on RHEL7, so it doesn't completely qualify for
                # manylinux1 support, but it's the minimum requirement
                # for building Qt. We only enable this for x64 limited
                # api builds (which are the only ones uploaded to
                # pypi).
                # TODO: Add actual distro detection, instead of
                # relying on limited_api option.
                if plat_name in ('linux-x86_64', 'linux_x86_64') and sys.maxsize > 2147483647 \
                             and self.py_limited_api:
                    plat_name = 'manylinux1_x86_64'
github cloudify-cosmo / wagon / wagon / utils.py View on Github external
def get_platform():
    return wheel_tags.get_platform()
github hobu / mgrs / mgrs / core.py View on Github external
def get_windows_platform_name():
    libname = 'libmgrs'
    try:
        import wheel.pep425tags
        name = wheel.pep425tags.get_abbr_impl() + \
			   wheel.pep425tags.get_impl_ver() + \
			   '-' + wheel.pep425tags.get_platform()
        return libname + '.' + name + '.pyd'
    except ImportError:
        return libname + '.pyd'