当前位置: 首页>>代码示例>>Python>>正文


Python builtins.__NUMPY_SETUP__属性代码示例

本文整理汇总了Python中builtins.__NUMPY_SETUP__属性的典型用法代码示例。如果您正苦于以下问题:Python builtins.__NUMPY_SETUP__属性的具体用法?Python builtins.__NUMPY_SETUP__怎么用?Python builtins.__NUMPY_SETUP__使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在builtins的用法示例。


在下文中一共展示了builtins.__NUMPY_SETUP__属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: finalize_options

# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import __NUMPY_SETUP__ [as 别名]
def finalize_options(self):
                _build_ext.finalize_options(self)
                # Prevent numpy from thinking it is still in its setup process:
                try:
                    __builtins__.__NUMPY_SETUP__ = False
                except:
                    try:
                        # For python 3
                        import builtins
                        builtins.__NUMPY_SETUP__ = False
                    except:
                        warn("Skipping numpy hack; if installation fails, try installing numpy first")
                import numpy
                self.include_dirs.append(numpy.get_include())
                if numpy.__dict__.get('quaternion') is not None:
                    from distutils.errors import DistutilsError
                    raise DistutilsError('The target NumPy already has a quaternion type') 
开发者ID:moble,项目名称:quaternion,代码行数:19,代码来源:setup.py

示例2: include_dirs_hook

# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import __NUMPY_SETUP__ [as 别名]
def include_dirs_hook():
        if hasattr(builtins, '__NUMPY_SETUP__'):
            del builtins.__NUMPY_SETUP__
        import numpy
        importlib.reload(numpy)

        ext = Extension('test', [])
        # ext.include_dirs.append(numpy.get_include())
        #iOS: 
        ext.include_dirs.append('../../onIpad/lib/python3.7/site-packages/numpy-1.16.0-py3.7-macosx-10.9-x86_64.egg/numpy/core/include/')
        print("Include dirs found: ", numpy.get_include())
        if not has_include_file(
                ext.include_dirs, os.path.join("numpy", "arrayobject.h")):
            warnings.warn(
                "The C headers for numpy could not be found. "
                "You may need to install the development package")
        #iOS: 
        return ['../../onIpad/lib/python3.7/site-packages/numpy-1.16.0-py3.7-macosx-10.9-x86_64.egg/numpy/core/include/']
        # return [numpy.get_include()] 
开发者ID:holzschu,项目名称:python3_ios,代码行数:21,代码来源:setupext.py

示例3: is_bootstrapping

# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import __NUMPY_SETUP__ [as 别名]
def is_bootstrapping():
    if sys.version_info[0] >= 3:
        import builtins
    else:
        import __builtin__ as builtins

    try:
        builtins.__NUMPY_SETUP__
        return True
    except AttributeError:
        return False


######################### 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:16,代码来源:misc_util.py

示例4: is_bootstrapping

# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import __NUMPY_SETUP__ [as 别名]
def is_bootstrapping():
    if sys.version_info[0] >= 3:
        import builtins
    else:
        import __builtin__ as builtins

    try:
        builtins.__NUMPY_SETUP__
        return True
    except AttributeError:
        return False
        __NUMPY_SETUP__ = False


######################### 
开发者ID:ryfeus,项目名称:lambda-packs,代码行数:17,代码来源:misc_util.py

示例5: finalize_options

# 需要导入模块: import builtins [as 别名]
# 或者: from builtins import __NUMPY_SETUP__ [as 别名]
def finalize_options(self):
        build_ext.finalize_options(self)
        import builtins

        # Prevent numpy from thinking it is still in its setup process:
        builtins.__NUMPY_SETUP__ = False
        import numpy

        self.include_dirs.append(numpy.get_include()) 
开发者ID:tskit-dev,项目名称:tskit,代码行数:11,代码来源:setup.py


注:本文中的builtins.__NUMPY_SETUP__属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。