libraries = ['z'] library_dirs = [zlibdir + '/lib'] include_dirs = ['.', 'src', npinclude, zlibdir + '/include'] else: libraries = [] library_dirs = [] include_dirs = ['.', 'src', npinclude] oalib_module = Extension('_oalib', sources=sources, include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries, swig_opts=swig_opts ) compile_options += ['-DNOOMP'] swig_opts += ['-DNOOMP'] oalib_module.extra_compile_args = compile_options if checkZlib(verbose=1): if platform.system() == 'Windows': pass else: zlibflag = '-DUSEZLIB' oalib_module.extra_compile_args += [zlibflag] swig_opts += [zlibflag] oalib_module.extra_link_args += ['-lz'] else: zlibflag = '-DNOZLIB' oalib_module.extra_compile_args += [zlibflag] swig_opts += [zlibflag] if os.name == 'nt':
progs = ['oainfo', 'oasplit', 'oacat'] progs = [] pm = [] for ii, p in enumerate(progs): prog_module = Extension(p, sources=sources + ['utils/%s.cpp' % p], include_dirs=include_dirs, library_dirs=library_dirs, libraries=libraries) pm.append(prog_module) compile_options += ['-DNOOMP'] swig_opts += ['-DNOOMP'] # ['-DNOOMP', '-DSWIGCODE', '-DFULLPACKAGE'] # '-DHAVE_BOOST' oalib_module.extra_compile_args = compile_options if checkZlib(verbose=0): if platform.system() == 'Windows': pass else: zlibflag = '-DUSEZLIB' oalib_module.extra_compile_args += [zlibflag] swig_opts += [zlibflag] oalib_module.extra_link_args += ['-lz'] else: zlibflag = '-DNOZLIB' oalib_module.extra_compile_args += [zlibflag] swig_opts += [zlibflag] if os.name == 'nt':
elif OSNAME == "Linux": libraries = ['msgpack', 'rt'] else: libraries = ['msgpack'] module = Extension('tquant._tqapi', define_macros=define_macros, include_dirs=include_dirs, libraries=libraries, library_dirs=[], sources=sources) if OSNAME == "Windows": module.extra_compile_args = ['/MT', '/DNOMINMAX'] msgpack[1]['cflags'] = ['/MT'] else: module.extra_compile_args = ['--std=c++11'] #export MACOSX_DEPLOYMENT_TARGET=10.10 setup(packages=['tquant'], package_dir={'tquant': 'pyext'}, libraries=[msgpack], ext_modules=[module], name='tquant', version='0.1.12', description="Acqusta quantitative trading tools", author="Xu Tiezhu", author_email='*****@*****.**',
elif OSNAME == "Linux": libraries = ['msgpack', 'rt'] else: libraries = ['msgpack', 'iconv'] module = Extension('tquant._tqapi', define_macros=define_macros, include_dirs=include_dirs, libraries=libraries, library_dirs=[], sources=sources) if OSNAME == "Windows": module.extra_compile_args = [ '/MT', '/DNOMINMAX', '/DWIN32_LEAN_AND_MEAN', '/source-charset:utf-8' ] msgpack[1]['cflags'] = ['/MT'] elif OSNAME == "Linux": module.extra_compile_args = ['-DLIBICONV_PLUG'] else: module.extra_compile_args = ['--std=c++11'] #export MACOSX_DEPLOYMENT_TARGET=10.10 setup(packages=['tquant'], package_dir={'tquant': 'pyext'}, libraries=[msgpack], ext_modules=[module], name='tquant', version='0.1.18',
elif OSNAME=="Linux": libraries = ['msgpack', 'rt'] else: libraries = ['msgpack', 'iconv'] module = Extension('tquant._tqapi', define_macros = define_macros, include_dirs = include_dirs, libraries = libraries, library_dirs = [], sources = sources) if OSNAME == "Windows": module.extra_compile_args = ['/MT', '/DNOMINMAX', '/source-charset:utf-8'] msgpack[1]['cflags'] = ['/MT'] else: module.extra_compile_args = ['--std=c++11' ] #export MACOSX_DEPLOYMENT_TARGET=10.10 setup(packages = [ 'tquant' ], package_dir = { 'tquant' : 'pyext'}, libraries = [ msgpack ], ext_modules = [module], name = 'tquant', version = '0.1.17', description="Acqusta quantitative trading tools", author = "Xu Tiezhu",
if os.path.isdir(SQLPARSER_DIR): parsebridge = Extension('sqlparser', sources = ['Parser.c', 'Statement.c', 'Node.c', 'ENodeType.c', 'parsebridgemodule.c', SQLPARSER_DIR + 'ext/node_visitor/node_visitor.c', SQLPARSER_DIR + 'ext/expr_traverse/expr_traverse.c', SQLPARSER_DIR + 'ext/modifysql/modifysql.c' ], include_dirs = [ SQLPARSER_DIR + 'core/', SQLPARSER_DIR + 'ext/collection/includes/', SQLPARSER_DIR + 'ext/expr_traverse/', SQLPARSER_DIR + 'ext/modifysql/', SQLPARSER_DIR + 'ext/node_visitor/' ], library_dirs = [ SQLPARSER_DIR + '/lib/' ], libraries = [ 'gspcollection', 'gspcore' ], define_macros = [ ('_CRT_SECURE_NO_WARNINGS', None), ('DONT_FIX_FRAGMENTS', None), ], extra_compile_args = ['-Wno-strict-prototypes'], ) if sys.platform == 'win32' or sys.platform == 'win64': parsebridge.extra_link_args = [ '/MANIFEST', '/DEBUG' ] parsebridge.extra_compile_args = [ '/Zi' ] setup (name = 'sqlparser', version = '1.0', description = 'A package for parsing SQL queries', author = 'Timo Djurken', url = 'https://github.com/TwoLaid/python-sqlparser', license = 'GPL', ext_modules = [ parsebridge ])