def get_extensions():

    extensions = []
    packages = get_packages()

    for pkg in packages:
        pkg_folder = pkg.replace('.', '/')
        pyx_files = glob.glob(os.path.join(pkg_folder, '*.pyx'))
        include_dirs = ['tribeflow/myrandom/', numpy.get_include()]
        for pyx in pyx_files:
            pxd = pyx.replace('pyx', 'pxd')
            module = pyx.replace('.pyx', '').replace('/', '.')

            if os.path.exists(pxd):
                ext_files = [pyx, pxd]
            else:
                ext_files = [pyx]
            
            if module == 'tribeflow.myrandom.random':
                ext_files.append(os.path.join(pkg_folder, 'randomkit.c'))
            
            extension = Extension(module, ext_files,
                    include_dirs=include_dirs,
                    extra_compile_args=['-msse', '-msse2', '-mfpmath=sse', \
                            '-fopenmp', '-Wno-unused-function'], #cython warnings supress
                    extra_link_args=['-fopenmp'])

            extensions.append(extension)

    return extensions
[--nossl] <network> [<host[:port]>] [<password>]
dataset/ETHPy150Open flaviovdf/tribeflow/setup.py/get_extensions--crossover with--dataset/ETHPy150Open ProgVal/Limnoria/plugins/Network/plugin.py/Network.connect