How to use the wheel.bdist_wheel.bdist_wheel 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-cli / src / command_modules / azure-cli-cosmosdb / azure_bdist_wheel.py View on Github external
def write_record(self, bdist_dir, distinfo_dir):
        if self.azure_namespace_package:
            # Split and remove last part, assuming it's "nspkg"
            subparts = self.azure_namespace_package.split('-')[0:-1]
        folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))]
        for azure_sub_package in folder_with_init:
            init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py')
            if os.path.isfile(init_file):
                logger.info("manually remove {} while building the wheel".format(init_file))
                os.remove(init_file)
            else:
                raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file))
        bdist_wheel.write_record(self, bdist_dir, distinfo_dir)
cmdclass = {
github whtsky / bencoder.pyx / setup.py View on Github external
def get_tag(self):
            tag = bdist_wheel.get_tag(self)
            if tag[2] == 'macosx_10_6_intel':
                tag = (tag[0], tag[1], REPLACE)
            return tag
github bambocher / pocketsphinx-python / setup.py View on Github external
self.run_command('build_ext')
        return _install.run(self)


cmdclass = {
    'build': build,
    'install': install,
}


try:
    from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
except ImportError:
    pass
else:
    class bdist_wheel(_bdist_wheel):
        def run(self):
            self.run_command('build_ext')
            return _bdist_wheel.run(self)

    cmdclass['bdist_wheel'] = bdist_wheel


if sys.platform.startswith('win'):
    class bdist_wininst(_bdist_wininst):
        def run(self):
            self.run_command('build_ext')
            return _bdist_wininst.run(self)

    cmdclass['bdist_wininst'] = bdist_wininst
github voxel51 / eta / setup.py View on Github external
#!/usr/bin/env python
"""
Installs ETA.

Copyright 2017-2020, Voxel51, Inc.
voxel51.com
"""
from setuptools import setup, find_packages
from wheel.bdist_wheel import bdist_wheel


class BdistWheelCustom(bdist_wheel):
    def finalize_options(self):
        bdist_wheel.finalize_options(self)
        # Pure Python, so build a wheel for any Python version
        self.universal = True


setup(
    name="voxel51-eta",
    version="0.1.2",
    description="Extensible Toolkit for Analytics",
    author="Voxel51, Inc.",
    author_email="info@voxel51.com",
    url="https://github.com/voxel51/eta",
    license="BSD-4-Clause",
    packages=find_packages(),
    include_package_data=True,
github spatialaudio / python-sounddevice / setup.py View on Github external
if libname and os.path.isdir('_sounddevice_data/portaudio-binaries'):
    packages = ['_sounddevice_data']
    package_data = {'_sounddevice_data': ['portaudio-binaries/' + libname,
                                          'portaudio-binaries/README.md']}
    zip_safe = False
else:
    packages = None
    package_data = None
    zip_safe = True

try:
    from wheel.bdist_wheel import bdist_wheel
except ImportError:
    cmdclass = {}
else:
    class bdist_wheel_half_pure(bdist_wheel):
        """Create OS-dependent, but Python-independent wheels."""

        def get_tag(self):
            pythons = 'py3.' + PYTHON_INTERPRETERS
            if system == 'Darwin':
                oses = MACOSX_VERSIONS
            elif system == 'Windows':
                if architecture0 == '32bit':
                    oses = 'win32'
                else:
                    oses = 'win_amd64'
            else:
                pythons = 'py3'
                oses = 'any'
            return pythons, 'none', oses
github Xtra-Computing / thundersvm / python / setup.py View on Github external
from os import path
import setuptools
from shutil import copyfile
from sys import platform
import os


from wheel.bdist_wheel import bdist_wheel as _bdist_wheel


class bdist_wheel(_bdist_wheel):
    def finalize_options(self):
        _bdist_wheel.finalize_options(self)
        self.root_is_pure = False

dirname = path.dirname(path.abspath(__file__))

if platform == "linux" or platform == "linux2":
    lib_path = path.abspath(path.join(dirname, '../build/lib/libthundersvm.so'))
elif platform == "win32":
    lib_path = path.abspath(path.join(dirname, '../build/bin/Debug/thundersvm.dll'))
elif platform == "darwin":
    lib_path = path.abspath(path.join(dirname, '../build/lib/libthundersvm.dylib'))
else:
    raise EnvironmentError("OS not supported!")

if not path.exists(path.join(dirname, "thundersvm", path.basename(lib_path))):
github streettraffic / streettraffic / setup.py View on Github external
if platform.system() == 'Windows':
        ## windows apparently is a little special, we have to install shapely through
        ## http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely
        if platform.architecture()[0] == '64bit':
            call(['pip', 'install', 'https://github.com/streettraffic/streettraffic.github.io/raw/master/assets/Shapely-1.5.17-cp36-cp36m-win_amd64.whl'])
        else:
            call(['pip', 'install', 'https://github.com/streettraffic/streettraffic.github.io/raw/master/assets/Shapely-1.5.17-cp36-cp36m-win32.whl'])
    else:
        call(['pip', 'install', 'shapely'])

class CustomInstallCommand(install):
    def run(self):
        custom_command()
        install.run(self)

class Custom_bdist_wheel(bdist_wheel):
    def run(self):
        custom_command()
        bdist_wheel.run(self)


setup(
    name = 'streettraffic',
    packages = find_packages(), # this must be the same as the name above
    version = '0.1.9',
    description = 'Monitor the traffic flow of your favorite routes, cities, and more',
    url='https://github.com/vwxyzjn/streettraffic',
    author = 'Costa Huang',
    author_email = 'Costa.Huang@outlook.com',
    python_requires='>=3.6',
    include_package_data = True,
    install_requires = [