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


Python Distribution.finalize_options方法代码示例

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


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

示例1: finalize_options

# 需要导入模块: from setuptools import Distribution [as 别名]
# 或者: from setuptools.Distribution import finalize_options [as 别名]
    def finalize_options(self):
        self.cmdclass['config'] = config

        self.cmdclass['build'] = build
        self.cmdclass['build_exe'] = build_exe
        self.cmdclass['build_qk'] = build_qk
        self.cmdclass['build_ext'] = build_ext
        self.cmdclass['build_qext'] = build_qext

        self.cmdclass['install'] = install
        self.cmdclass['install_exe'] = install_exe
        self.cmdclass['install_qlib'] = install_qlib
        self.cmdclass['install_qext'] = install_qext

        self.cmdclass['test'] = PyTest

        default_qhome_root = os.getenv('SystemDrive') + '\\' if platform == 'Windows' else os.getenv('HOME')
        self.qhome = os.getenv('QHOME') or os.path.join(default_qhome_root, 'q')

        bits = BITS
        if platform == 'Linux':
            o = 'l'
        elif platform == 'SunOS':
            o = 'v' if uname()[-1] == 'i86pc' else 's'
        elif platform == 'Darwin':
            o = 'm'
            bits = 32
        elif platform == 'Windows':
            o = 'w'
            bits = 32  # FIXME: We test with 32-bit kdb+ on Windows, so forcing 32-bit version.
        else:
            sys.stderr.write("Unknown platform: %s\n" % str(platform))
            sys.exit(1)
        self.qarch = "%s%d" % (o, bits)
        self.install_data = os.path.join(self.qhome, self.qarch)
        self.kxver = self.get_kxver(self.qhome)
        self.qexecutable = os.path.join(self.qhome, self.qarch, 'q')
        _Distribution.finalize_options(self)
        for ext in self.ext_modules + self.qext_modules:
            ext.define_macros.append(('KXVER', self.kxver.split('.')[0]))
            ext.define_macros.append(('QVER', self.kxver.split('.')[0]))
            if sys.hexversion >= 0x3000000:
                ext.define_macros.append(('PY3K', "%s%s" % sys.version_info[:2]))
开发者ID:zjc5415,项目名称:pyq,代码行数:45,代码来源:setup.py

示例2: finalize_options

# 需要导入模块: from setuptools import Distribution [as 别名]
# 或者: from setuptools.Distribution import finalize_options [as 别名]
    def finalize_options(self):
        self.cmdclass['config'] = config

        self.cmdclass['build'] = build
        self.cmdclass['build_exe'] = build_exe
        self.cmdclass['build_qk'] = build_qk
        self.cmdclass['build_ext'] = build_ext
        self.cmdclass['build_qext'] = build_qext

        self.cmdclass['install'] = install
        self.cmdclass['install_exe'] = install_exe
        self.cmdclass['install_qlib'] = install_qlib
        self.cmdclass['install_qext'] = install_qext

        self.cmdclass['test'] = PyTest

        self.qhome = os.getenv('QHOME') or os.path.join(os.getenv('HOME'), 'q')
        bits = 8 * get_config_var('SIZEOF_VOID_P')
        u = os.uname()
        if u[0] == 'Linux':
            o = 'l'
        elif u[0] == 'SunOS':
            o = 'v' if u[-1] == 'i86pc' else 's'
        elif u[0] == 'Darwin':
            o = 'm'
            bits = 32
        else:
            sys.stderr.write("Unknown platform: %s\n" % str(u))
            sys.exit(1)
        self.qarch = "%s%d" % (o, bits)
        self.install_data = os.path.join(self.qhome, self.qarch)
        self.kxver = self.get_kxver(self.qhome)
        self.qexecutable = os.path.join(self.qhome, self.qarch, 'q')
        _Distribution.finalize_options(self)
        for ext in self.ext_modules + self.qext_modules:
            ext.define_macros.append(('KXVER', self.kxver.split('.')[0]))
            ext.define_macros.append(('QVER', self.kxver.split('.')[0]))
            if sys.hexversion >= 0x3000000:
                ext.define_macros.append(('PY3K', "%s%s" % sys.version_info[:2]))
开发者ID:e42s,项目名称:pyq,代码行数:41,代码来源:setup.py


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