本文整理汇总了Python中setuptools.Extension.extra_compile_args方法的典型用法代码示例。如果您正苦于以下问题:Python Extension.extra_compile_args方法的具体用法?Python Extension.extra_compile_args怎么用?Python Extension.extra_compile_args使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类setuptools.Extension
的用法示例。
在下文中一共展示了Extension.extra_compile_args方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Extension
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import extra_compile_args [as 别名]
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':
示例2: Extension
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import extra_compile_args [as 别名]
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 ])