本文整理汇总了Python中numpy.distutils.numpy_distribution.NumpyDistribution方法的典型用法代码示例。如果您正苦于以下问题:Python numpy_distribution.NumpyDistribution方法的具体用法?Python numpy_distribution.NumpyDistribution怎么用?Python numpy_distribution.NumpyDistribution使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类numpy.distutils.numpy_distribution
的用法示例。
在下文中一共展示了numpy_distribution.NumpyDistribution方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_distribution
# 需要导入模块: from numpy.distutils import numpy_distribution [as 别名]
# 或者: from numpy.distutils.numpy_distribution import NumpyDistribution [as 别名]
def get_distribution(always=False):
dist = distutils.core._setup_distribution
# XXX Hack to get numpy installable with easy_install.
# The problem is easy_install runs it's own setup(), which
# sets up distutils.core._setup_distribution. However,
# when our setup() runs, that gets overwritten and lost.
# We can't use isinstance, as the DistributionWithoutHelpCommands
# class is local to a function in setuptools.command.easy_install
if dist is not None and \
'DistributionWithoutHelpCommands' in repr(dist):
dist = None
if always and dist is None:
dist = NumpyDistribution()
return dist