Exemplo n.º 1
0
    ])

if py3c_found is False:
    include_dirs.append('py3c')

compiler = ccompiler.get_default_compiler()

extra_link_args = []
extra_compile_args = []

if compiler == 'msvc':
    extra_compile_args = ['/Ot', '/Wall']
elif compiler in ('unix', 'mingw32'):
    if liblz4_found:
        extra_link_args.append(pkgconfig_libs('liblz4'))
        if pkgconfig_cflags('liblz4'):
            extra_compile_args.append(pkgconfig_cflags('liblz4'))
    else:
        extra_compile_args = ['-O3', '-Wall', '-Wundef']
else:
    print('Unrecognized compiler: {0}'.format(compiler))
    sys.exit(1)

lz4version = Extension('lz4._version',
                       lz4version_sources,
                       extra_compile_args=extra_compile_args,
                       extra_link_args=extra_link_args,
                       libraries=libraries,
                       include_dirs=include_dirs)

lz4block = Extension('lz4.block._block',
Exemplo n.º 2
0
    )

if py3c_found is False:
    include_dirs.append('py3c')

compiler = ccompiler.get_default_compiler()

extra_link_args = []
extra_compile_args = []

if compiler == 'msvc':
    extra_compile_args = ['/Ot', '/Wall']
elif compiler in ('unix', 'mingw32'):
    if liblz4_found:
        extra_link_args.append(pkgconfig_libs('liblz4'))
        if pkgconfig_cflags('liblz4'):
            extra_compile_args.append(pkgconfig_cflags('liblz4'))
    else:
        extra_compile_args = [
            '-O3',
            '-Wall',
            '-Wundef'
        ]
else:
    print('Unrecognized compiler: {0}'.format(compiler))
    sys.exit(1)

lz4version = Extension('lz4._version',
                       lz4version_sources,
                       extra_compile_args=extra_compile_args,
                       extra_link_args=extra_link_args,