本文整理汇总了Python中setuptools.Extension.sources方法的典型用法代码示例。如果您正苦于以下问题:Python Extension.sources方法的具体用法?Python Extension.sources怎么用?Python Extension.sources使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类setuptools.Extension
的用法示例。
在下文中一共展示了Extension.sources方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: dict
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import sources [as 别名]
os.path.join(here, 'src', 'sha1.c'),
os.path.join(here, 'src', 'sort.c'),
],
extra_compile_args=['-std=c99'],
),
}
# collect extensions
for module, kwargs in modules.items():
kwargs = dict(extension_kwargs, **kwargs)
kwargs.setdefault('sources', [source_extension(module)])
kwargs['sources'] = prepare_sources(kwargs['sources'])
ext = Extension('{0}.{1}'.format(PACKAGE, module), **kwargs)
if suffix == '.pyx' and ext.sources[0].endswith('.c'):
# undo setuptools stupidly clobbering cython sources:
ext.sources = kwargs['sources']
extensions.append(ext)
#-----------------------------------------------------------------------------
# Description, version and other meta information.
#-----------------------------------------------------------------------------
re_meta = re.compile(r'__(\w+?)__\s*=\s*(.*)')
re_vers = re.compile(r'VERSION\s*=\s*\((.*?)\)')
re_doc = re.compile(r'^"""(.+?)"""')
rq = lambda s: s.strip("\"'")
def add_default(m):
attr_name, attr_value = m.groups()
示例2: License
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import sources [as 别名]
'Environment :: Console',
'Environment :: Other Environment',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: POSIX',
'Operating System :: Unix',
'Programming Language :: Python',
'Programming Language :: Cython',
'Programming Language :: C',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Software Development'
],
'install_requires' : [
"numpy >= 1.6.1",
],
'zip_safe' : False,
# extention building part
'ext_modules' : [logdet],
'cmdclass' : {'build_ext': build_ext}
}
if not CYTHON_FOUND:
logdet.sources = ['logdet/logdet.c']
setup(**configuration)