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


Python build_ext.finalize_options方法代码示例

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


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

示例1: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [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: finalize_options

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

        # prevent numpy from thinking it is still in its setup process:
        set_builtin('__NUMPY_SETUP__', False)
        import numpy as np
        self.include_dirs.append(np.get_include()) 
开发者ID:jeongyoonlee,项目名称:Kaggler,代码行数:9,代码来源:setup.py

示例3: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        build_ext.finalize_options(self)
        # Prevent numpy from thinking it is still in its setup process:
        # https://docs.python.org/2/library/__builtin__.html#module-__builtin__
        if isinstance(__builtins__, dict):
            __builtins__["__NUMPY_SETUP__"] = False
        else:
            __builtins__.__NUMPY_SETUP__ = False

        import numpy as np
        self.include_dirs.append(np.get_include()) 
开发者ID:hpclab,项目名称:rankeval,代码行数:13,代码来源:setup.py

示例4: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        build.finalize_options(self)
        # self.set_undefined_options("build_ext", ("download_dir", "download_dir"))
        if self.download_dir:
            openfst_tar_gz = os.path.join(self.download_dir, self.openfst_basename)
            assert os.path.isfile(openfst_tar_gz), (
                "File %s does not exist" % openfst_tar_gz
            )
        else:
            self.download_dir = self.build_temp 
开发者ID:jpuigcerver,项目名称:openfst-python,代码行数:12,代码来源:setup.py

示例5: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        _build_ext.finalize_options(self)
        __builtins__.__NUMPY_SETUP__ = False
        import numpy
        self.include_dirs.append(numpy.get_include()) 
开发者ID:vBaiCai,项目名称:python-pesq,代码行数:7,代码来源:setup.py

示例6: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        build_ext.finalize_options(self)
        # 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:oxfordcontrol,项目名称:osqp-python,代码行数:8,代码来源:setup.py

示例7: my_build_ext

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def my_build_ext(pars):
    # import delayed:
    from setuptools.command.build_ext import build_ext as _build_ext
    class build_ext(_build_ext):
        def finalize_options(self):
            _build_ext.finalize_options(self)
            # Prevent numpy from thinking it is still in its setup process:
            __builtins__.__NUMPY_SETUP__ = False
            import numpy
            self.include_dirs.append(numpy.get_include())

    #object returned:
    return build_ext(pars) 
开发者ID:ing-bank,项目名称:sparse_dot_topn,代码行数:15,代码来源:setup.py

示例8: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        _build_ext.finalize_options(self)
        # 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:JeremyCCHsu,项目名称:Python-Wrapper-for-World-Vocoder,代码行数:8,代码来源:setup.py

示例9: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        _build_ext.finalize_options(self)
        # Prevent numpy from thinking it is still in its setup process:
        __builtins__.__NUMPY_SETUP__ = False
        import numpy
        self.include_dirs.append(numpy.get_include())


# check whether user has Cython 
开发者ID:johnveitch,项目名称:cpnest,代码行数:11,代码来源:setup.py

示例10: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [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

示例11: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
      _build_ext.finalize_options(self)
      # 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:thampiman,项目名称:reverse-geocoder,代码行数:8,代码来源:setup.py

示例12: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        _build_ext.finalize_options(self)
        # Fix to work with bootstrapped numpy installation
        # http://stackoverflow.com/a/21621689/579416
        # 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:mirnylab,项目名称:pairtools,代码行数:10,代码来源:setup.py

示例13: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        '''
        In order to avoid premature import of numpy before it gets installed as a dependency
        get numpy include directories during the extensions building process
        http://stackoverflow.com/questions/19919905/how-to-bootstrap-numpy-installation-in-setup-py
        '''
        build_ext.finalize_options(self)
        # Prevent numpy from thinking it is still in its setup process:
        set_builtin('__NUMPY_SETUP__', False)
        import numpy
        self.include_dirs.append(numpy.get_include()) 
开发者ID:autonomousvision,项目名称:occupancy_flow,代码行数:13,代码来源:setup.py

示例14: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        build_ext.finalize_options(self)
        # 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:Borda,项目名称:pyImSegm,代码行数:8,代码来源:setup.py

示例15: finalize_options

# 需要导入模块: from setuptools.command.build_ext import build_ext [as 别名]
# 或者: from setuptools.command.build_ext.build_ext import finalize_options [as 别名]
def finalize_options(self):
        build_ext.finalize_options(self)
        is_windows = platform.system() == 'Windows'
        is_py2 = sys.version_info[0] < 3
        is_py34 = sys.version_info[:2] == (3, 4)
        if self.compiler is None and is_windows and (is_py2 or is_py34):
            self.compiler = 'mingw32' 
开发者ID:theacodes,项目名称:cmarkgfm,代码行数:9,代码来源:setup.py


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