本文整理汇总了Python中setuptools.Extension.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python Extension.__init__方法的具体用法?Python Extension.__init__怎么用?Python Extension.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类setuptools.Extension
的用法示例。
在下文中一共展示了Extension.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, *args, **kwargs):
_Extension.__init__(self, self.name, self.sources, **kwargs)
# Add local source files to include_dirs
self.include_dirs.append(os.path.join(os.getcwd(), "giraffez"))
# Windows compatbility
if platform.system() == 'Windows':
if is_64bit():
self.define_macros.append(('WIN64', 1))
else:
self.define_macros.append(('WIN32', 1))
elif platform.system() == 'Darwin':
self.extra_compile_args = ['-Wfatal-errors', '-Wno-empty-body']
else:
self.extra_compile_args = ['-Wfatal-errors','-std=c99']
if develop:
self.define_macros.append(("DEBUG_LOGGING", 1))
示例2: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, name):
# don't invoke the original build_ext for this special extension
Extension.__init__(self, name, sources=[])
示例3: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self):
Extension.__init__(self, name="openfst_python.pywrapfst", sources=[])
示例4: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, name, sourcedir=''):
Extension.__init__(self, name, sources=[])
self.sourcedir = os.path.abspath(sourcedir)
示例5: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, name):
Extension.__init__(self, name, sources=[])
示例6: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, *args, **kwargs):
self.condition = kwargs.pop("condition", lambda builder: True)
Extension.__init__(self, *args, **kwargs)
# The C extensions used for Twisted.
示例7: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, name, sourcedir=''):
Extension.__init__(self, name, sources=[])
self.sourcedir = os.path.abspath(sourcedir)
示例8: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, dest_module, target, lib, sources=[], **kwa):
Extension.__init__(self, dest_module, sources=sources, **kwa)
self.target = target
self.lib = lib
示例9: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, name, cmake_lists_dir=PACKAGE_NAME, **kwargs):
Extension.__init__(self, name, sources=[], **kwargs)
self.cmake_lists_dir = os.path.abspath(cmake_lists_dir)
示例10: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, *args, **kwargs):
from numpy import get_include
from numpy.distutils.misc_util import get_info
kwargs.update(get_info('npymath'))
kwargs['include_dirs'] += [get_include()]
Extension.__init__(self, *args, **kwargs)
示例11: get_property
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def get_property(prop, project):
result = re.search(r'{}\s*=\s*[\'"]([^\'"]*)[\'"]'.format(prop),
open(project + '/__init__.py').read())
return result.group(1)
示例12: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, name, sourcedir=''):
"""A CMake Build Extension, for invoking CMake building of TensorFlow C++ plugins.
Requires CMake to be installed.
"""
Extension.__init__(self, name, sources=list(find_files(sourcedir)))
self.sourcedir = os.path.abspath(sourcedir)
示例13: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, name, sourcedir=""):
Extension.__init__(self, name, sources=[])
self.sourcedir = os.path.abspath(sourcedir)
示例14: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, name, sourcedir=""):
# Make build optionnal
Extension.__init__(self, name, sources=[], optional=True)
self.sourcedir = os.path.abspath(sourcedir)
示例15: __init__
# 需要导入模块: from setuptools import Extension [as 别名]
# 或者: from setuptools.Extension import __init__ [as 别名]
def __init__(self, *args, **kwargs):
Extension.__init__(self, *args, **kwargs)
self._include_dirs = self.include_dirs
del self.include_dirs # restore overwritten property