當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。